Draw line to mouse and trace x,y every 5 pixels

As the title loosely suggests, I’d like to draw a line from pointA to the mouse position, and trace along that line and return the x,y position every 5 pixels.

If I could get any help on this it would be most appreciated.

Thanks!

Brendan