Step 1: Balance the forces at terminal speed.
Once the speed is steady, the net force is zero, so the viscous force plus the buoyant force equals the weight.
Step 2: Write the buoyant force.
The ball's volume is $V = \tfrac{M}{d_1}$, so the upthrust is $V d_2 g = Mg\tfrac{d_2}{d_1}$.
Step 3: Solve for the viscous force.
\[ F_v = Mg - Mg\frac{d_2}{d_1} = Mg\left(1 - \frac{d_2}{d_1}\right). \]
Step 4: State it.
\[ \boxed{Mg\left(1 - \tfrac{d_2}{d_1}\right)} \]