Initially, $P_1$ is running and $P_2$ is ready.
When the time quantum of $P_1$ expires, the following events occur in order:
First, the timer generates an interrupt.
$3.$ Timer interrupt occurs.
The current user-level state of $P_1$ must then be saved so that $P_1$ can resume later.
$1.$ $P_1$'s user-level state is saved into a trap frame.
The operating system scheduler now runs and selects the next process.
$4.$ The operating system scheduler runs.
Since $P_2$ is selected, a context switch occurs from $P_1$ to $P_2$.
$5.$ Context switch from $P_1$ to $P_2$.
Finally, the saved user-level state of $P_2$ is restored so that it can resume execution.
$7.$ $P_2$'s user-level state is restored.

Therefore, the correct sequence is:
$3 \rightarrow 1 \rightarrow 4 \rightarrow 5 \rightarrow 7$
Answer : A