It is not as simple as you may think, and you shall run into trouble when coming to the second integral. The value of the innermost integral is not $2\sqrt{a^2-x^2}$, it is $2\sqrt{a^2-x^2}$ when $|x|\leq a$ and $0$ when $x\geq a$. This has to be taken into account when doing the next integral, with respect to $x$. There will be cases to consider. Choosing another ordering of the variables, letting the variable $x$ being the outermost variable, will avoid running into cases. But wait.
Here is how I would go at it: I'm assuming $a\leq b$. Looking at the figure we can immediately see that planes $x={\rm const.}$ intersect the body $B$ whose volume we want to compute in rectangles $R_x$. It remains to find the area of $R_x$ and then to integrate over $x$. When $|x|>a$ then $R_x=\emptyset$. When $|x|\leq a$ then
$$R_x=\bigl\{(y,z)\>\bigm|\>|y|\leq \sqrt{b^2-x^2}, \ |z|\leq\sqrt{a^2-x^2}\bigr\}\ .$$
It follows that
$${\rm area}(R_x)=4\sqrt{(b^2-x^2)(a^2-x^2)}\qquad(-a\leq x\leq a)\ .$$
Therefore we obtain
$${\rm vol}(B)=8\int_0^a \sqrt{(b^2-x^2)(a^2-x^2)}\>dx\ .$$
I'm afraid that this is an elliptic integral when $b>a$.
Let
- $r = 1$ be the common radii of the two cylinders.
- $2d$ be the nearest distance between the two axis of the cylinders.
- $\alpha = 2\beta$ be the angle between the two axis of the cylinders.
Choose the coordinate system so that the axis of the cylinders pass through
$(0, \pm d, 0)$ with tangent vectors $( \pm\sin\beta, 0, \cos\beta)$ respectively. It is not hard to see the two cylinders are give by.
$$\mathcal{C}_{\pm} = \left\{ (x,y,z) \in \mathbb{R}^3 : ( x\cos\beta \mp z\sin\beta )^2 + (y \mp d)^2 \le r^2 \right\}$$
If we intersect $\mathcal{C}_{\pm}$ with a plane of constant $z$, the intersections will be two axis aligned ellipses with semi major axis $\frac{r}{\cos\beta}$ in the $x$-direction and semi minor axis $r$ in the $y$-direction.
Introduce new coordinates
$$(u,v,w) = (x\cos\beta, y, z\sin\beta) \quad\iff\quad
(x,y,z) = \left(\frac{u}{\cos\beta}, v, \frac{w}{\sin\beta}\right)
$$
The intersections of $\mathcal{C}_{\pm}$ with a plane of constant $w$ become two circles of radii $r$.
$$(u \mp w)^2 + (v \mp d)^2 \le r^2$$
and these two circles intersect when and only when $d^2 + w^2 \le r^2$.
When they intersect, let $\theta = \cos^{-1}\left(\frac{\sqrt{d^2 + w^2}}{r}\right)$. In the diagram below, the intersection is the one bounded by the two circular arc in red. Its area is equal to
$$\begin{align}
& \verb/Area/(\text{sector } ABD) + \verb/Area/(\text{sector } CDB)
- \verb/Area/(\text{rhombus } ABCD)\\
= & 2\verb/Area/(\text{sector } ABD) - 4\verb/Area/(\text{triangle } OAB)\\
= & 2\left(\frac12 r^2(2\theta)\right) - 4\left(\frac12 (r\sin\theta)(r\cos\theta)\right)\\
= & r^2(2\theta - \sin(2\theta))
\end{align}
$$
$\hspace1.25in$ ![Intersection of two cylinder](https://i.stack.imgur.com/K9Z2x.jpg)
Let $\displaystyle\;\theta_0 = \cos^{-1}\left(\frac{d}{r}\right)\;$,
the volume we want becomes
$$\begin{align}\verb/Volume/
&= \overbrace{\frac{1}{\cos\beta\sin\beta}}^{\color{blue}{\text{Jacobian}}}
\int_{-\sqrt{r^2 - d^2}}^{\sqrt{r^2 - d^2}} r^2 (2\theta - \sin(2\theta)) d w\\
&= \frac{-4r^3}{\sin\alpha} \int_{0}^{\theta_0} (2\theta - \sin(2\theta)) d\sqrt{\cos^2\theta - \cos^2\theta_0}\\
\color{blue}{\text{ integrate by part } \rightarrow}
&= \frac{16 r^3}{\sin\alpha}\int_0^{\theta_0} \sin^2\theta \sqrt{\cos^2\theta - \cos^2\theta_0} d\theta\\
\color{blue}{ m = \sin^2\theta_0 \rightarrow}
&= \frac{16 r^3}{\sin\alpha}\int_0^\sqrt{m} \frac{\sin^2\theta}{\cos\theta}\sqrt{m - \sin\theta^2} d\sin\theta\\
\color{blue}{ \sin\theta = \sqrt{m} t \rightarrow}
&= \frac{16 r^3 m^2}{\sin\alpha}\int_0^1 t^2\sqrt{\frac{1-t^2}{1-mt^2}} d t\\
&= \frac{16 r^3 m^2}{\sin\alpha}\int_0^1 \frac{t^2 - t^4}{\sqrt{(1-t^2)(1-mt^2)}} dt
\end{align}
$$
Let $Q(t) = (1-t^2)(1-mt^2)$, it is easy to check
$$\frac{d}{dt}\left(t \sqrt{Q(t)}\right)
= \frac{1}{\sqrt{Q(t)}}\left(3m t^4 - 2(m+1) t^2 + 1\right)$$
We can use this to transform the last integral as
$$\begin{align}\verb/Volume/
&= \frac{16 r^3 m}{3\sin\alpha}\int_0^1 \frac{3m t^2 - 2(m+1) t^2 + 1}{\sqrt{Q(t)}} dt\\
&= \frac{16 r^3}{3\sin\alpha}\int_0^1 \frac{(2-m)(1-mt^2) - 2(1-m)}{\sqrt{Q(t)}} dt
\end{align}
$$
Compare this with the definition of the complete
elliptic integrals of the $1^{st}$ and $2^{nd}$ kind.
$$\begin{align}
K(m)
&= \int_0^{\pi/2} \frac{d\theta}{\sqrt{1-m\sin^2\theta}}
= \int_0^1 \frac{dt}{\sqrt{(1-mt^2)(1-t^2)}}\\
E(m) &= \int_0^{\pi/2} \sqrt{1-m\sin^2\theta} d\theta
= \int_0^1 \sqrt{\frac{1-mt^2}{1-t^2}} dt
\end{align}
$$
We get
$$\verb/Volume/ = \frac{16 r^3}{3\sin\alpha}\left((2-m)E(m) - 2(1-m)K(m)\right)$$
As a sanity check, when $d \to 0$, $m \to 1^{-}$, we have
$$(1-m)K(m) \to 0\quad\text{ and }\quad (2-m)E(m) \to E(1) = 1$$
This leads to a familiar result for the volume of intersection when the axis intersect.
$$\verb/Volume/_{d = 0} = \frac{16r^3}{3\sin\alpha}$$
Best Answer
Compare the solid to a sphere of the same size. The slices of the solid are squares to the sphere's circles, so the ratio of areas is always $4/\pi$. The volumes must therefore be in the same ratio, giving $(4/\pi) \cdot (4/3)\pi r^3 = (16/3) r^3$.