Answer
Particle B must be located at $(8.0~cm, 20.0~cm)$
Work Step by Step
We can find particle B's x-coordinate:
$x_{com} = \frac{(30.0~g)(0)+(10.0~g)(x_B)}{30.0~g+10.0~g}$
$2.0~cm = \frac{0+(10.0~g)(x_B)}{40.0~g}$
$2.0~cm = \frac{x_B}{4}$
$x_B = 8.0~cm$
We can find particle B's y-coordinate:
$y_{com} = \frac{(30.0~g)(0)+(10.0~g)(y_B)}{30.0~g+10.0~g}$
$5.0~cm = \frac{0+(10.0~g)(y_B)}{40.0~g}$
$5.0~cm = \frac{y_B}{4}$
$y_B = 20.0~cm$
Particle B must be located at $(8.0~cm, 20.0~cm)$.