Find the two nearest points to your point; just do this with pythagoras, but don't sqrt, you don't need the distance, only the order.
Work out the gradient between these two points (y1-y2)/(x1-x2) where 1 is one of the points and 2 is the other. This is from solving y=mx+c for m for the two points (simultaneous equation). Then use one of these points to calculate c by substituting back into the equation y=m*x+c for one of the two points, you'll use this later.
Divide -1 by this gradient, called mn (This calculates the gradient of the normal, a line perpendicular to the original line), then calculate cn=y-mn*x, where x and y are your initial point.
You then have two lines so you have to solve the simultaneous equation
y=mn*x+cn and y=m*x+c for both x and y. That's your answer!