Assume:
#color(white)("XXX")color(red)(x)Ca+color(red)(y)P rarr color(red)(z)Ca_2P_3#
Based on #Ca#
[1]#color(white)("XXX")x-2z=0#
Based on #P#
[2]#color(white)("XXX")y-3z=0#
In order to find the ratio of #(x:y:z)# we will arbitrarily set one of our variables to #1#; later we may need to adjust our ratios to get integer results.
In order to see how this works in the general case I have chosen to use #x=1#
From [1] with #x=1#
[3]#color(white)("XXX")z=1/2#
From [2] with #z=1/2#
[4]#color(white)("XXX")y=3/2#
So the ratio of components is
#color(white)("XXX")(1,3/2,1/2)#
Since we want integer factors we will multiply all terms by #2# to clear all fractions, giving:
#color(white)("XXX")(x:y:z) = (2:3:1)#