3. Two pyramids have a common base - a square with side $a$. The pyramids are on the same side of the square's plane. The heights of the two pyramids pass through the midpoints of two opposite sides of the square and are equal to $b$. Find the volume of the common part of the two pyramids.
Solution. Let $A B C D F$ and $A B C D E$ be the given pyramids (see the drawing). The common part is obtained when from the right prism $A B C D N' M'$ (see the drawings) the two pyramids $C D N' N$ and $A B M' M$ are removed.

From the rectangle $A B E F$ (see the drawing), it follows that $M$ is the midpoint of $A E$. Similarly, $N$ is the midpoint of $C F$. According to this, $\overline{A B}=a$, and the height of $\triangle A B M'$, dropped from $M'$ is $\frac{b}{2}$. On the other hand, since $M N$ is the midline in triangle $A D E$, it follows that $\overline{M N}=\frac{a}{2}$. According to this: $\overline{M M'}=\overline{N N'}=\frac{a}{4}$, and:

$$
\begin{aligned}
V_{A B C D M N} & =V_{A B C D M} N' - 2 V_{C D N N'} \\
& =\frac{1}{2} \cdot a \cdot \frac{b}{2} \cdot a - 2 \cdot \frac{1}{3} \cdot \frac{1}{2} a \cdot \frac{b}{2} \cdot \frac{a}{4} \\
& =\frac{a^{2} b}{4} - \frac{a^{2} b}{24} = \frac{5}{24} a^{2} b
\end{aligned}
$$