Whatever P's contents are, we have to print L's content of that node.
Since P is sorted in increasing order, hence for any print action we never have to go back in L. In just one careful traverse we can do this.
So $O(n)$
A little more details:-
Assume P's contents are 3, 16, 49 and 200. (sorted in increasing order)
We have to print the contents of L located at node 3, node 16, node 49 and node 200.
So, max we need to go to 200, and this can happen in a single pass.
So, $O(n)$ // to traverse P
$+ O(1)$ // to traverse upto the last element specified by P, which will be some constant.
=> $O(n)+ O(1)=O(n)$