What are Clg, Cmg, and Cng? Capacitances? If so, what values? What is alpha? At a guess, it's a value between 0 and 1, but if you don't tell us then we can only guess. What is P? An angular frequency? If all of my guesses are correct, then the formulas calculate reactances, not impedances. You need to provide more information.
I would give you this advice: to study well Electrical Engineering, and do many exercises on the exercise book writing with the pen, then, in the future, go to mathcad.