\magnification=\magstep1

$$
T \ - \ F_f \quad = \quad m_A a
$$

$$
T \ - \ m_B g \quad = \quad -m_B a
$$

$$
T \quad = \quad F_f \ + \ m_A a
$$

$$
F_f \ + m_A a \ - \ m_B g \quad = \quad -m_B a
$$

$$
F_f \quad = \quad  m_B g \ - (m_A + m_B ) a
$$

\bye
