The gravitational force acting between the two masses $m_{1}$ and $m_{2}$ is given by
$F_{G}=\frac{G m_{1} m_{2}}{r^{2}}$
Force on mass $m_{1}$
$F_{1}=\frac{G m_{1} m_{2}}{r^{2}}=m_{1} a_{1}$
where, $a_{1}=$ acceleration
$\Rightarrow a_{1}=\frac{G m_{2}}{r^{2}}$
$\Rightarrow a_{1} \propto m_{2}$
and similarly, $a_{2} \propto m_{1}$