This problem comes from a riddle at the five thirty-eight. Basically, the problem is this:
You have a conical martini glass, which is filled such that the length of the liquid up the side of the glass is ratio, $p$, of the total length of the side of the glass. When the glass is tipped so that the liquid just reaches the brim, what distance does the liquid go up the opposite side of the glass?
Here’s two approaches, and an applet to play with: