3. Given real numbers $x, y$ satisfy $x y+6=x+9 y$, and $y \in(-\infty, 1)$. Then the maximum value of $(x+3)(y+1)$ is
$\qquad$ .
3. $27-12 \sqrt{2}$.

From the condition, we get $x=\frac{9 y-6}{y-1}$, then
$$
(x+3)(y+1)=\frac{(12 y-9)(y+1)}{y-1}=-12(1-y)-\frac{6}{1-y}+27 .
$$

Since $y \in(-\infty, 1)$, then $1-y \in(0,+\infty)$, hence
$$
(x+3)(y+1)=-\left(12(1-y)+\frac{6}{1-y}\right)+27 \leqslant 27-2 \sqrt{12(1-y) \cdot \frac{6}{1-y}}=27-12 \sqrt{2} .
$$

When $y=1-\frac{\sqrt{2}}{2}$, the maximum value is achieved.