We'll use cylindrical coordinates. In cylindrical coordinates
- the sphere x2+y2+z2=a2 becomes r2+z2=a2 and
- the circular cylinder x2+y2=ax (or equivalently (x−a/2)2+y2=a2/4)
becomes r2=arcosθ or r=acosθ.
Here is a sketch of the top view of the solid.

The solid is
{ (rcosθ,rsinθ,z) −π/2≤θ≤π/2,0≤r≤acosθ,−a2−r2≤z≤a2−r2 }
By symmetry, the volume of the specified solid is four times
the volume of the solid
{ (rcosθ,rsinθ,z) 0≤θ≤π/2,0≤r≤acosθ,0≤z≤a2−r2 }
Since dV=rdrdθdz,
the volume of the solid is
4∫0π/2dθ∫0acosθdr∫0a2−r2dz r=4∫0π/2dθ∫0acosθdr ra2−r2=−34∫0π/2dθ (a2−r2)3/20acosθ=34∫0π/2dθ [a3−(a2−a2cos2θ)3/2]=34a3∫0π/2dθ [1−sin3θ]=34a3[θ−121cos(3θ)+43cosθ]0π/2=34a3[2π+121−43]=34a3[2π−32]