Yes it is given to be wrong..Let us see how..
When i = 1 and j = 1 , P will be printed 0 times as the if condition fails as 1 < 1 is false and the if conditions in subsequent instances of inner loop will also fail obviously as j increases..
When i = 2 , P gets printed for j = 1 only so one time printed
When i = 3 , P gets printed for j = 1,2 only so 2 times printed.
Now proceeding in this manner till
When i = n , P gets printed for j = 1,2,3....,n-1 so (n-1) times printed..
Now from i = n + 1 to i = 2n - 1 , we will get to print j for n times..
So no of such i's = (2n - 1) - (n+1) + 1
= n - 1
So total number of times P gets printed = (0+1+2....n-1 terms) + n * (n-1)
= n(n-1)/2 + n(n-1)
= 3/2(n2 - n)
But none of the answers given so..So options should be corrected..