Till $t = 4$, the waiting time of $P1 = 1$ and $P2 = 0$ and $P3=1$ but $P3$ has not started yet.
Case 1:
Note that if $P4$ burst time is less than $P3$ then $P4$ will complete and after that $P3$ will complete. Therefore Waiting time of $P4$ should be $0$. And total waiting time of $P3 = 1 +$ ( Burst time of $P4$) because until $P4$ completes $P3$ does not get a chance.
Then average waiting time $= \frac{1+0+(1+x)+0}{4} = 1$
$\frac{2+x}{4} = 1 \Rightarrow x = 2.$
Case 2:
Note that if $P4$ burst time is greater than $P3$ then $P4$ will complete after $P3$ will complete. Therefore, Waiting time of $P3$ remains the same. And total waiting time of $P4 =$ ( Burst time of $P3$) because until $P3$ completes $P4$ does not get a chance.
Then average waiting time $= \frac{1+0+1+3}{4} = 1$
$\frac{5}{4} \neq 1 \Rightarrow$ This case is invalid.
Correct Answer: 2