Given that \(g\left( x \right) = xf\left( x \right)\).
Differentiating the function we get
\(\begin{aligned}g'\left( x \right) & = \frac{d}{{dx}}xf\left( x \right)\\ & = xf'\left( x \right) + f\left( x \right)\end{aligned}\)
So \(g'\left( 3 \right) = 3 \times f'\left( 3 \right) + f\left( 3 \right)\).
Substitute 3 for x into the function of \(g'\left( x \right)\) to determine \(g'\left( 3 \right)\).
\(\begin{aligned}g'\left( 3 \right) & = 3 \times \left( { - 2} \right) + 4\\ & = - 6 + 4\\ & = - 2\end{aligned}\)
Substitute 3 for x into the function of \(g\left( x \right)\) to determine \(g\left( 3 \right)\).
\(\begin{aligned}g\left( 3 \right) & = 3 \times f\left( 3 \right)\\ & = 3 \times 4\\ & = 12\end{aligned}\)