Answer
(a) $m_A = 5.0 ~kg$
(b) $m_A = 1.0 \times 10^1 ~kg$
Work Step by Step
(a) Let's assume that the acceleration is zero.
Let's consider the force equation for $m_A$.
$\sum ~F_x = ma$
$F_T - F_f = 0$
$F_T = F_f$
Let's consider the force equation for $m_B$.
$\sum ~F = ma$
$(m_B)~g - F_T = 0$
$F_T = (m_B) ~g$
$F_f = (m_B)~g$
$(m_A)(g)(\mu_s) = (m_B) ~g$
$m_A = \frac{(m_B)}{\mu_s} = \frac{2.0 ~kg}{0.40} = 5.0 ~kg$
(b) If the system is moving at a constant speed, then the acceleration is zero.
We can use the same equations from part (a) to solve this part of the question.
$F_f = (m_B)~g$
$(m_A)(g)(\mu_k) = (m_B) ~g$
$m_A = \frac{(m_B)}{\mu_k} = \frac{2.0 ~kg}{0.20} = 1.0 \times 10^1~kg$