Thanks for answering, everyone.
zoki85, that is very neatly done. Turns out we didn't need the cosine rule at all.
Filip Larsen, yes it is established that tan (45 - θ) = x / ( x + y ). But after expansion, we are left with (1 - tan θ) / (1 + tan θ ) using this formula...
If you have an...