How to get a P2 position of vertex ?

I want to get P2 position when provided a P1 position as 3D cursor and view_matrix of region3d and x,y,z and x2,y2,z2 of edge1.

Look at My script

Look at preview Video

And i don’t know english.
So look at the below image.

Please answer to me.
Thank you.

  1. Search “picking”
  2. My attempt,

Picking uses ray from eye to cursor constrained to view frustum.
Cursor in zNear.
Constrain to picking to edge.
Project pick ray to edge plane.
P2 is intersection of projected ray and edge.

In simple terms, you want to equate two position vector equations, one being a point along the left most line, the second a point along the ray from the frustum