Step 1: First we have to write polynomials in descending order.
$$ \begin{aligned} P(x) &= 3a^2+1 \\ Q(x) &= 2a^2+4 \\ \end{aligned} $$Step 2: Write second polynomial below the first one. Making sure like terms are lined up.
$$ \begin{array}{lrr} & 3a^2 & 1 \\ \color{red}{ - } & 2a^2 & 4 \\ \hline \end{array} $$Step 3: Change ALL the signs in the second row.
$$ \begin{array}{lrr} & 3a^2 & 1 \\ \color{red}{ - } & -2a^2 & -4 \\ \hline \end{array} $$Step 4: Combine like terms (add each column):
$$ \begin{array}{lrr} & 3a^2 & 1 \\ \color{red}{ - } & -2a^2 & -4 \\ \hline & 5a^2 & 5 \end{array} $$