Answer
(a) $\tau_g = 31.0~N~m$
(b) $\tau_g = 21.9~N~m$
Work Step by Step
(a) The gravitational torque comes from the center of mass of the arm $m_a$ and the ball $m_b$ in the person's hand. We can find the magnitude of the gravitational torque about his shoulder.
$\tau_g = r_a\times m_a~g+r_b\times m_b~g$
$\tau_g = (0.40 \times0.70m)(3.8~kg)(9.80~m/s^2)+ (0.70~m)(3.0~kg)(9.80~m/s^2)$
$\tau_g = 31.0~N~m$
(b) We can find the magnitude of the gravitational torque about his shoulder when the arm is at an angle of $45^{\circ}$.
$\tau_g = r_a\times m_a~g+r_b\times m_b~g$
$\tau_g = (0.40\times0.70~m)(3.8~kg)(9.80~m/s^2)~sin(45^{\circ})+ (0.70~m)(3.0~kg)(9.80~m/s^2)~sin(45^{\circ})$
$\tau_g = 21.9~N~m$