You are looking for the cross product
So this is a little complicated, I will try to remember to post the code tomorrow. So vector from each line, actually it's a ray, with start point and direction. If the rays intersect there is a formual for getting the point.
ok so i have been trying to strip out my code for this but it is so embedded that i cannot get you something to start with.
reference these sites. what you are getting into is not so much fun. it seems simple but the math is quite complex
This one will get you what you need right below. it is what i used to get what i needed.