The easiest (and very generalized) way to solve this is to say that
L1 + x*(L2 - L1) = (P1 + y*(P2 - P1)) + (P1 + z*(P3 - P1))
which gives you 3 equations of 3 variables. Solve for x, y, and z, and then return to one of the original equations to get the answer. This can be generalized to accomplish complex things, such as finding a point that is the intersection of two planes in 4 dimensions.
N of (P2-P1) (P3-P1) - , . , P , P N P1 N. x , (L1 + x*(L2 - L1)) dot N , , . , .
:
N = cross(P2-P1, P3 - P1)
Answer = L1 + (dot(N, P1 - L1) / dot(N, L2 - L1)) * (L2 - L1)
cross([x, y, z], [u, v, w]) = x*u + y*w + z*u - x*w - y*u - z*v
dot([x, y, z], [u, v, w]) = x*u + y*v + z*w
, .