Answer
(a) A potential function for ${\bf{F}}$ is $gz$.
(b) The velocity of the ball when it reaches $Q$ is ${v_Q} \approx 82.8$ m/s.
Work Step by Step
(a) Since the gravitational field is conservative, let the potential energy for the gravitational force ${\rm{m}}{\bf{F}}$ be $V\left( {x,y,z} \right)$ such that ${\rm{m}}{\bf{F}} = - \nabla V = - \left( {\dfrac{{\partial V}}{{\partial x}},\dfrac{{\partial V}}{{\partial y}},\dfrac{{\partial V}}{{\partial z}}} \right)$. So,
a. taking the integral of $\dfrac{{\partial V}}{{\partial x}}$ with respect to $x$ gives
$V\left( {x,y,z} \right) = - m\smallint 0{\rm{d}}x = 0 + p\left( {y,z} \right)$
b. taking the integral of $\dfrac{{\partial V}}{{\partial y}}$ with respect to $y$ gives
$V\left( {x,y,z} \right) = - m\smallint 0{\rm{d}}y = 0 + q\left( {x,z} \right)$
c. taking the integral of $\dfrac{{\partial V}}{{\partial z}}$ with respect to $z$ gives
$V\left( {x,y,z} \right) = mg\smallint {\rm{d}}z = mgz + r\left( {x,y} \right)$
Since the three ways of expressing $V\left( {x,y,z} \right)$ must be equal, we get
$p\left( {y,z} \right) = q\left( {x,z} \right) = mgz + r\left( {x,y} \right)$
From here we conclude that the potential energy is $V\left( {x,y,z} \right) = mgz + C$, where $C$ is a constant.
So, a potential function for ${\bf{F}}$ is $gz$.
(b) By the Law of Conservation of Energy, the total energy $E$ is constant and therefore $E$ has the same value when the ball is at $P = \left( {3,2,400} \right)$ and at $Q = \left( { - 21,40,50} \right)$.
So,
$E = \frac{1}{2}m{v_P}^2 + {V_P} = \frac{1}{2}m{v_Q}^2 + {V_Q}$
where ${v_P}$ and ${V_P}$ are the velocity and potential energy of the ball at $P$, respectively. Likewise, ${v_Q}$ and ${V_Q}$ are the velocity and potential energy of the ball at $Q$, respectively.
Since ${v_P} = 0$, we obtain
$\frac{1}{2}m{v_Q}^2 = {V_P} - {V_Q}$
${v_Q} = \sqrt {\frac{2}{m}\left( {{V_P} - {V_Q}} \right)} $
${v_Q} = \sqrt {\frac{2}{2}\left( {2\cdot9.8\cdot400 - 2\cdot9.8\cdot50} \right)} \approx 82.8$
So, the velocity of the ball when it reaches $Q$ is ${v_Q} \approx 82.8$ m/s.