Again, you need to draw a proper FBD. You need to label torques, forces, axes, and distances on your drawing. My robot arm tutorial gives examples.
(sorry for being rough on you, but an FBD is the very first thing I do before writing down a single equation, it makes it much easier just trust me here . . .)
Anyway, looking at your equations, the horizontal arm motor should be:
And about the z axis, as I said again and again, you have to consider it as separate point masses
The upwards equation looks right.
Looking at this, you should also consider efficiency and friction effects. You can't calculate either one, only determine it after its all built. For dynamic torque, you should add about ~20% more required torque to account for these factors.