Solve for point of intersection between two lines

I have two CFrames and for this the x, z, yaw and pitch of the CFrames will be needed.
I want to calculate the point of intersection between the two points’ x and z without respect to y, e.g.
image
I need a way of solving the two lines simultaneously no matter the positions or orientations of P0 or P2.

Any help - let me know!

That has been solved already. See here: