Let me rephrase your question to be what I think it is, then answer it.
You're given points A = (x1, y1) and B = (x2, y2). You want to find a point Z = (x3, y3) such that AZ is perpendicular to AB, and BZ has length h.
The vector from A to B is v = (x2 - x1, y2 - y1). An easy to calculate perpendicular vector to that one is w = (y2 - y1, x1 - x2). The line crossing through A which is perpendicular to AB is represented by F(s) = A + s*w = (x1 + s*(y2 - y1), y1 + s*(x1 - x2)) as s ranges over the real numbers. So we need to pick a value s such that F(s) is h away from B.
From the Pythagorean theorem, the square of the length from F(s) to B is always going to be the square of the distance from F(s) to A, plus the square of the distance from A to B. From which we get the messy expression that we want:
h**2 = s**2 * ((y2 - y1)**2 + (x1-x2)**2) + ((x1 - x2)**2 + (y1 - y2)**2))
= s**2 * ((x1 - x2)**2 + (y1 - y2)**2)) + ((x1 - x2)**2 + (y1 - y2)**2))
= (s**2 + 1) * ((x1 - x2)**2 + (y1 - y2)**2))
(s**2 + 1) = h**2 / ((x1 - x2)**2 + (y1 - y2)**2))
s**2 = h**2 / ((x1 - x2)**2 + (y1 - y2)**2)) - 1
s = sqrt(h**2 / ((x1 - x2)**2 + (y1 - y2)**2)) - 1)
Now plug that expression for s back into F(s) = (x1 + s*(y2 - y1), y1 + s*(x1 - x2)) and you have your point Z. And the other possible answer is the same distance on the other side.