Answer: a) $\frac{4}{3}$; b) 48.

Let $KH$ be the height of the pyramid $(KH=h)$, and $P$ be the projection of $K$ onto the line $AB$. Then $KHP$ is a right triangle with an angle $\angle KPH=45^{\circ}$, from which $HP=h \cdot \operatorname{ctg} 45^{\circ}=h$. Similarly, it can be proven that the point $H$ is at a distance $r=h$ from each of the lines $BC, CD, DA$ (in other words, a circle of radius $r$ centered at $H$ touches the lines $AB, BC, CD, DA$).

The triangles $BAD$ and $BCD$ are equal by three sides, so the quadrilateral $ABCD$ is symmetric with respect to the diagonal $BD$. Its area $S$ is equal to $2S_{BAD}=AB \cdot AD \sin \angle BAD$, so $S \leqslant AB \cdot AD=12$. Equality is achieved when $\angle BAD=90^{\circ}$, so $S_{\max }=12$.

The point $H$ lies on the internal or external bisector of each of the angles of the quadrilateral $ABCD. BD$ is the internal bisector of angles $B$ and $D$. The external bisectors of angles $B$ and $D$ are parallel, so $H$ must lie on $BD$. Let $I$ and $J$ be the points of intersection of the internal and external bisectors of angle $A$ with the line $BD$. Then $I$ is the center of the inscribed circle of the quadrilateral $ABCD$ (let its radius be $r_{1}$); $J$ is the center of the circle that touches the extensions of the sides of the quadrilateral $ABCD$ (the exscribed circle, let its radius be $r_{2}$). The area of a quadrilateral with an inscribed circle can be given by the formula $S=\frac{(AB+BC+CD+DA) r_{1}}{2}$, from which $r_{1}=\frac{S}{7}$. Also, $S=S_{ADJ}+S_{CDJ}-S_{ABJ}-S_{BCJ}=\frac{(AD+CD-AB-BC) r_{2}}{2}$, from which $r_{2}=S$.

The pyramid satisfies the condition of the problem if and only if (1) the height passes through the center of the inscribed circle in the base (i.e., $H=I$) and its length is $h=r_{1}=\frac{S}{7}$ or (2) the height passes through the center of the exscribed circle (i.e., $H=J$) and $h=r_{2}=S$.

a) When $h=2$, the first case is impossible ($S=7r_{1}=7h=14>12$). Therefore, only the second case remains, and then $S=r_{2}=h=2$. The volume is $V=\frac{Sh}{3}=\frac{4}{3}$.

b) The volume in the first and second cases is $V_{1}=\frac{Sh}{3}=\frac{S^2}{21}$ and $V_{2}=\frac{Sh}{3}=\frac{S^2}{3}$. The maximum volume $V_{\max}=\frac{S_{\max}^2}{3}=48$.
7. Consider quadrilateral pyramids $KABCD$ with the following properties: the base of the pyramid is a convex quadrilateral $ABCD$, where $AB = BC = 3$, $CD = DA = 4$, and each of the planes of the lateral faces $KAB$, $KBC$, $KCD$, $KDA$ forms an angle of $45^{\circ}$ with the plane of the base.

a) Find the volume of such a pyramid if its height, dropped from vertex $K$, is 2.

b) For what height is the volume of the considered pyramids maximized, and what is this volume?