Try doing it "cleanly" :
we have f = c(s - a) / s(c - a)
Multiply by s(c - a):
c(s - a) =fs(c - a)
Do the multiplications:
cs - ca = fcs - fas
Get the terms with s together:
fas - fcs + cs = ca
Factor out the s:
s(fa - fc + c) = ca
Finish off:
s = ca / (fa - fc + c)
That's it !