Get vertex pair from fixture.

Hi everyone.
First of all - sorry for my English.
My problem:
What is the best way to get vertex pair that contains point. I have square fixture and i create RayCast that collide with it.
So i get point of collision this raycast and my fixture. But i need get the line which raycast collide.

How i can get point 1 and 2.
Now i do that, I create Linear equation https://en.wikipedia.org/wiki/Linear_equation for each vertex pair, than i try search where it is more or less satisfies the conditions - i dont like that. maybe exist more good variant or at least know more powerful algorithm to search is point on line or not, because that i use - It has a large error. Help me find it pls.