Consider the decay of a particle $X$ to two particles $c$ and $d$ in the rest frame of $X$. Using energy and momentum (4-vector) conservation, show that the energy of particle $c$ is given by: $$E_c=\frac{\left(m_X^2+m_c^2-m_d^2\right)c^2}{2m_X}\tag{A}$$ and similary for $E_d$.
I have specific questions regarding the solution (quoted below) to the above problem which outlines an important 'recipe' for solving general problems involving particle collisions using energy-momentum four-vectors:
Let $P_X$ be the 4-momentum of particle $X$, $E_X$ its energy, and $\bf p_X$ its 3-momentum vector — and similarly for particles $c$ and $d$. From energy and momentum conservation we can write: $$P_X=P_c+P_d$$ We are not so interested in particle $d$ for now, so we isolate it on the left side: $$P_d=P_X-P_c$$ Now we square both sides and replace the 4-vector norms by the invariant masses, which is valid in all reference frames (many problems in relativistic kinematics involve these steps): $$P_d^2=P_X^2+P_c^2-2P_X \cdot P_c$$ $$m_d^2c^2=m_X^2c^2+m_c^2c^2-2P_X\cdot P_c\tag{1}$$ (You can now see why we isolated $d$: so that its information would not get caught up in the dot product...). In the frame of $X$, which corresponds to the centre-of-mass frame, in this case, $\boldsymbol{p_X} = \boldsymbol{0}$ and $\boldsymbol{p_c} = −\boldsymbol{p_d}$; we can write the two 4-vectors we need: $$P_X=\left(\frac{E_X}{c},\,\bf p_X\right)=(\color{red}{m_Xc},0,0,0)$$ $$P_c=\left(\frac{E_c}{c},\,\bf p_c\right)=(E_c/c,{p_c}^x,0,0)$$ where we defined the x-axis along the motion of $c$ and $d$. The dot product is: $$P_X \cdot P_c=m_XE_c-0=m_XE_c$$ Replacing back in the equation for $m_d$ $(1)$ this gives: $$m_d^2c^2=m_X^2c^2+m_c^2c^2-2m_XE_c$$ and, as required, $$E_c=\frac{\left(m_X^2+m_c^2-m_d^2\right)c^2}{2m_X}$$ and similary for $E_d$, by swapping $c$ and $d$: $$E_d=\frac{\left(m_X^2+m_d^2-m_c^2\right)c^2}{2m_X}$$
That is the end of the proof. I have marked in red the part for which I don't understand. Why is there a $m_Xc$ in the first element of a four-vector which (I thought) should have dimensions of energy, not momentum?
This leads me to the other question I have, it was my understanding that general four-vectors are written as $$(E,p_xc,p_yc,p_zc)$$ I thought that the elements of four vectors must all have the same dimensions and that those dimensions are energy (as above).
Update:
In the answer given by @Shrey
In the solution, they've used convention A, but you would get the same answer if you used convention B instead - it's just that all your equations would be multiplied by $c^2$ now. I suggest that you check this directly!
So I will:
$$P_X=\left(E_X,\,\boldsymbol{p_X}c\right)=(m_Xc^2,0,0,0)$$ $$P_c=\left(E_c,\,\boldsymbol{p_c}c\right)=(E_c,{p_c}^xc,0,0)$$ So $$P_X\cdot P_c=E_cm_Xc^2-0=E_cm_Xc^2$$ substituting this result in $(1)$: $$m_d^2c^2=m_X^2c^2+m_c^2c^2-2E_cm_Xc^2$$ $$\implies E_c\stackrel{\color{red}{{?}}}{=}\frac{m_X^2+m_c^2-m_d^2}{2m_X}$$
Well, this is definitely not the same answer as $(\rm{A})$. So what am I missing?