Sodium phosphate is made of #Na^+# and #PO_4^(3-)#; the overall charge of the compound must be neutral, so it's #Na_3PO_4#.
Similarly, beryllium nitrate is #Be^(2+)# and #NO_3^-#; they must make #Be(NO_3)_2#.
To figure out the products of a double replacement reaction, we just swap the pairings—the anions of one compound go with the cations of the other.
#Na^+# will now bond with #NO_3^-#, making #NaNO_3#.
#Be^(2+)# will now bond with #PO_4^(3-)#, making #Be_3(PO_4)_2#.
Therefore, our skeleton equation is:
#Na_3PO_4 + Be(NO_3)_2 -> NaNO_3 + Be_3(PO_4)_2#
This is how to balance that equation:
#Na_3PO_4 + Be(NO_3)_2 -> NaNO_3 + Be_3(PO_4)_2#
#Na_3PO_4 + Be(NO_3)_2 -> color(red)3NaNO_3 + Be_3(PO_4)_2#
#color(red)2Na_3PO_4 + Be(NO_3)_2 -> 3NaNO_3 + Be_3(PO_4)_2#
There's #2# phosphates on the product side, so we're going to have to add a coefficient of #2# on #Na_3PO_4#.
This also means we have to change the coefficient in front of #NaNO_3#, because there are now #6# sodiums on the reactant side.
#2Na_3PO_4 + Be(NO_3)_2 -> color(red)6NaNO_3 + Be_3(PO_4)_2#
#2Na_3PO_4 + color(red)3Be(NO_3)_2 -> 6NaNO_3 + Be_3(PO_4)_2#
Finally, check if everything balances out:
- #6# #Na# on both sides.
- #2# #PO_4# on both sides.
- #3# #Be# on both sides.
- #6# #NO_3# on both sides.
#2Na_3PO_4 (aq) + 3Be(NO_3)_2 (aq) -> 6NaNO_3 (aq) + Be_3(PO_4)_2 (s)#
The states of matter were added because double replacement reactions usually are precipitation reactions, where a precipitate is formed from two aqueous solutions.
Every compound in that equation is soluble in water except for #Be_3(PO_4)_2#, so that's the precipitate.