A hard geometry problem on circles
Solution 1:
Nothing to do with harmonic functions :)
This is a version of the classical Problem of Apollonius, for which there are both geometric and algebraic solutions. See http://en.wikipedia.org/wiki/Problem_of_Apollonius#Ten_combinations_of_points.2C_circles.2C_and_lines and/or http://mathworld.wolfram.com/ApolloniusProblem.html. For the algebraic approach, you can use the chord lengths $a$ and $b$ to write down equations of the two lines (say, through the fixed point $(-1,0)$ on the unit circle).
Edit #3: OK, it turns out one has to be a bit more careful than I was. Given $a<b$, there are two configurations (up to congruence). So, at long last, we have $f(a,b)=$ $$ \frac{a^2 (2+\sqrt{4-b^2})+a b (\sqrt{4-a^2}-\sqrt{4-b^2})+(\sqrt{4-a^2}-2)(4 \sqrt{4-b^2}+8-b^2)}{(a+b)^2} $$ when the chords are on the same side of the diameter through the common point of the chords, and
$$\frac{a^2(2-\sqrt{4-b^2})+ab(\sqrt{4-a^2}+\sqrt{4-b^2})-(\sqrt{4-a^2}-2) (b^2+4\sqrt{4-b^2}-8)}{(a+b)^2}$$ when they are on opposite sides of the diameter.
I thank @Rahul Narain for insisting I get it right :) It is reassuring that these formulas do agree when $b=2$.
Still no harmonic functions.