I have another solution, maybe you like this one more than the first.

Let d be the length of AB. Let M be the projection of C to AB and let a be the length of AM and b that of MB. Then, using trigonometry, we find

a = tg(b) d / ( tg(a) + tg(b) )

b = tg(a) d / ( tg(a) + tg(b) ).

Using a and b we find the point M as

M = (b A + a B) / (a + b).

Finally the length h of MC is

h = tg(a) tg(b) d / ( tg(a) + tg(b) ).

The point C is now obtained by adding to M a vector w orthogonal to v = AB with length h. To find the orthogonal vector w first we compute v = (x_B - x_A, y_B - y_A), then we normalize it u = v / |v| , let say we get u = (x, y), and we have w = (-y, x). So

C = M + h w.

This new solution is more geometrical. I have however to say that your question hasn’t a direct solution; or at least I don’t see it…

Ciao!