Presumably the bottom varies uniformly between 3-9'.
For $h\in[0,6]$ the length of the surface water line is $h {40 \over 6}$.
For $h \in [6,9]$ the length of the surface water line is $40$.
Let $l(h) = \begin{cases} h {40 \over 6}, & h\in[0,6) \\
40, & h \in [6,9] \end{cases}$.
Then the volume of water is given by $v(h) = 20 \int_0^h l(x) dx$.
Hint:
You can solve the problem without integrals.
1) translate the spheres such that one of them has center in the origin (this does not change the volumes): e.g.
$$
x^2+y^2+z^2=25 \qquad (x-10)^2+y^2+z^2=64
$$
2) intersects the two sphere and find the value $x_0$ that is the point on the $x$ axis between which passes the plane of intersection (it is easy).
3) note that the volume that you want is the sum of the volumes of two spherical caps for which you can find the height $h$ and the radius $a$ from the radii of the sphere, the position of the centers and $x_0$ (use symmetries).
4)Calculate the volume of the two caps with the formula
$$
V=\frac{\pi h}{6}\left( 3a^2+h^2\right)
$$
Using integrals without ''tricks'':
The equations of the spheres are:
$$
(x-c_1)^2+y^2+z^2=R_1^2 \qquad (x-c_2)^2+y^2+z^2=R_2
$$
with $c_1=5$,$c_2=15$, $R_1=5$ and $R_2=8$.
Subtracting the two equations we find the plane that contain the circle of intersection between the two spheres: $x=\frac{161}{20}=b$.
Now see the figure where is represented a section of the two spheres in the $xy$ plane and note that, by symmetry, the figure is the same for the plane $xz$.
![enter image description here](https://i.stack.imgur.com/nkorB.jpg)
we can easily see that $$\alpha=\frac{1}{2}\arccos\left(\frac{b-c_1}{R_1} \right)$$
So we see that the cap after $b$, limited by the sphere of radius $R_1$ has limits, in spherical coordinates:
$$
b\le r\le c_1+R_1 \qquad \frac{\pi}{2}-\alpha\le\theta\le \frac{\pi}{2}+\alpha \qquad -\alpha \le \phi \le \alpha
$$
and the cap before $b$ limited by the sphere of radius $R_2$ has limits:
$$
c_2-R_2\le r\le b \qquad \frac{\pi}{2}-\alpha\le\theta\le \frac{\pi}{2}+\alpha \qquad -\alpha \le \phi \le \alpha
$$
So the volume can be calculated as:
$$
\int_{-\alpha}^{\alpha}\int_{\frac{\pi}{2}-\alpha}^{\frac{\pi}{2}-\alpha}\int_b^{c_1+R_1}r^2\sin\theta dr d\theta d\phi + \int_{-\alpha}^{\alpha}\int_{\frac{\pi}{2}-\alpha}^{\frac{\pi}{2}-\alpha}\int_{c_2-R_2}^{b}r^2\sin\theta dr d\theta d\phi
$$
Best Answer
As you well have shown, the volume of water inside the glass is given (note that $h$ is a function of time):
$$V(t) = \frac{\pi h^2(t)}{2}. $$ On the other hand, the surface area exposed to the air by water is given by:
$$A_s = \pi r^2(t),$$ where $r$ is the instant radius of the glass when the height of water is $h(t)$. This two quantities are related by $h = r^2$ since the shape of the glass is the given parabola $y = x^2$. You can readily show that $A_s = \sqrt{2 \pi V}$ by elementary substitution. Since we are given the rate of evaporation per unit of volume and unit of area (exposed surface), $q$, we have that:
$$ \frac{\mathrm{d}V}{\mathrm{d}t} = q A_s,$$ which readily yields to the desired expression for $\dot{V}(t)$: $\dot{V} = -q \sqrt{2\pi V}$, which is a separable differential equation, to be integrated as follows:
$$ \int^{V=0}_{V=V_0} \frac{\mathrm{d}V}{\sqrt{V}} = - q \sqrt{2\pi} \int^{t=t_F}_{t=0} \, \mathrm{d}t,$$ where $V_0$ is the volume of water at $t=0$, i.e., $V_0 = \pi h^2(0)/2$, and $t_F$ is the time you are being asked to compute.
I hope you find this helpful.
Cheers!