The answer is (C).
$$\overset{\text{Available Resources}}{\begin{array}{|l|l|l||}\hline
\text{X} & \text{Y} & \text{Z} \\\hline \text{0} & \text{1} & \text{2}
\\\hline\end{array}}$$ Now, $P1$ will execute first, As it meets the needs. After completion, The available resources are updated.
$$\qquad \overset{\text{Updated Available Resources}}{\begin{array}{|l|l|l||}\hline
\text{X} & \text{Y} & \text{Z} \\\hline \text{2} & \text{1} & \text{3}
\\\hline\end{array}}$$
Now $P0$ will complete the execution, as it meets the needs.
After completion of $P0$ the table is updated and then $P2$ completes the execution.
Thus $P2$ completes the execution in the last.