We have $p_1+p_2+p_3=1$ and $p_1+2p_2+3p_3=2$. We want to maximize/minimize $p_1+4p_2+9p_3-4$.
We can treat it as a $1$ variable problem, by using the first two equations to express $p_1$ and $p_2$ in terms of $p_3$.
We get $p_2=1-2p_3$ and $p_1=p_3$. Substituting, we find that we want to maximize/minimize $2p_3$.
For the maximum, we want $p_3$ as big as possible. The biggest $p_3$ that makes $p_2\ge 0$ is $p_3=1/2$. Makes sense. The mean is $2$, so for maximum variance we want the distribution to be as spread out as possible, with all the weight at the two ends. One can find the answer without the above "algebra."
The smallest possible $p_3$ is $0$, which concentrates all the mass at the single point $2$. Again this makes sense, putting all the mass at $2$ gives variance $0$, and one can't do better than that!
Remark: Since the constraints (including the invisible $p_i \ge 0$) and the objective function are linear, our max and min must be reached at boundary points.