Let the cup is filled to height h after some time
now the total volume of coffee filled in the cup is given as
[tex]\frac{2}{y} = \frac{4}{6+y}[/tex]
[tex]2y = 6 + y[/tex]
[tex]y = 6 cm[/tex]
now volume of the coffee will be
[tex]V = \frac{1}{3}\pi r^2(y + 6) - \frac{1}{3}\pi 2^2 (6)[/tex]
here we know that
[tex]\frac{r}{y+6} = \frac{2}{6}[/tex]
[tex]r = \frac{y+6}{3}[/tex]
[tex]V = \frac{1}{3}\pi (\frac{y+6}{3})^2(y+6) - \frac{1}{3}\pi 2^2(6)[/tex]
now we know that volume flow rate is given as
[tex]Q = \frac{dV}{dt}[/tex]
[tex]20 cm^3/s = \frac{1}{3}\pi (\frac{1}{9})(3(y+6)^2)\frac{dy}{dt}[/tex]
[tex]20 \times 9 = \pi (y + 6)^2 v[/tex]
here y = 3 cm
[tex]180 = \pi (9)^2 v[/tex]
[tex]v = 0.71 cm/s[/tex]
so water will rise up with speed 0.71 cm/s