$\begin{array}{l} \left[ { - \dfrac{\pi }{2};\dfrac{\pi }{2}} \right]\\ \Rightarrow 0 \le \cos x \le 1 \end{array}$
$\begin{array}{l} \Rightarrow 0 \le 3\cos x \le 3\\ \Rightarrow 2 \le 3\cos x + 2 = y \le 5 \end{array}$
$\begin{array}{l} \Rightarrow \left\{ \begin{array}{l} \max y = 5 \Rightarrow \cos x = 1 \Rightarrow x = 0\\ \min y = 2 \Rightarrow \cos x = 0 \Rightarrow x = \pm \dfrac{\pi }{2} \end{array} \right.\\ \end{array}$
$\begin{array}{l} \Rightarrow \left\{ \begin{array}{l} \max y = 5 \Rightarrow \cos x = 1 \Rightarrow x = k2\pi \\ \min y = 2 \Rightarrow \cos x = 0 \Rightarrow x = \dfrac{\pi }{2} + k\pi \end{array} \right.\\ \end{array}$
Do $x\in [-\dfrac{\pi}{2};\dfrac{\pi}{2}]$ nên$\begin{array}{l} \Rightarrow \left\{ \begin{array}{l} \max y = 5 \Rightarrow \cos x = 1 \Rightarrow x = 0\\ \min y = 2 \Rightarrow \cos x = 0 \Rightarrow x = \pm \dfrac{\pi }{2} \end{array} \right.\\ \end{array}$