Find Pareto-optima two good economy
The first equality, as you've already found, equates $A$'s and $B$'s MRSs. The last equality comes from setting the marginal rate of transformation $MRT_{XY}$ between $X$ and $Y$ to the common MRS. For a production function with a single input and a single output, $MRT_{XY}$ is equal to $MP_X$, the marginal product of the input good $X$. That is:

$$ MRT_{XY} = \frac{1}{2}\sqrt\frac{5}{X}. $$

For details, see Mas-Colell, Whinston and Green (1995), section 16.F.