solve for q: 1 = 1+ 1

__ __ __

f p q

Your post did not come out the way you intended.

I assume you meant:

1/f = 1/p + 1/q

multiply by fpq
pq = fq + fp
pq - fp = fq
p(q - f) = fq
p = fq/(q-f)