3B. Determine all pairs of integers $(x, y)$ that satisfy the equation

$$
x y + 3 y = x^2 + 6 x + 12
$$
Solution. The equation can be transformed as follows

$$
\begin{aligned}
& y(x+3)=(x+3)^{2}-9+12 \\
& y(x+3)=(x+3)^{2}+3 \\
& y=x+3+\frac{3}{x+3}
\end{aligned}
$$

The fraction $\frac{3}{x+3}$ must be an integer, so for $x \neq-3$ we have the following cases

1) $x+3=-1 \Rightarrow x=-4$ and $y=-4$
2) $x+3=1 \Rightarrow x=-2$ and $y=4$
3) $x+3=3 \Rightarrow x=0$ and $y=4$
4) $x+3=-3 \Rightarrow x=-6$ and $y=-4$

Thus, the solutions to the equation are the pairs $(-4,-4),(-2,4),(0,4),(-6,-4)$.