3. In the rectangular coordinate plane, given $A(-\sqrt{3}, 0)$, $B(\sqrt{3}, 0)$, point $P$ moves on the line $y=\frac{\sqrt{3}}{3}(x+4)+1$. When $\angle A P B$ is maximized, the value of $\frac{P A}{P B}$ is $\qquad$.
3. $\sqrt{3}-1$.

As shown in Figure 5, let the intersection point of the line with the $x$-axis be $M$. By plane geometry knowledge, to maximize $\angle A P B$, the circle passing through points $A$, $B$, and $P$ must be tangent to the line at point $P$.
Since $\angle M P A = \angle M B P$, we have $\triangle M P A \sim \triangle M B P$. Therefore, $\frac{P A}{P B} = \frac{M P}{M B}$.
By the secant-tangent theorem, we get
$$
\begin{array}{l}
M P^{2} = M A \cdot M B . \\
\text { Hence } \frac{P A}{P B} = \sqrt{\frac{M P^{2}}{M B^{2}}} = \sqrt{\frac{M A}{M B}} .
\end{array}
$$

Given $M(-4-\sqrt{3}, 0)$, $A(-\sqrt{3}, 0)$, and $B(\sqrt{3}, 0)$, we have
$$
\begin{array}{l}
M A = 4, M B = 4 + 2 \sqrt{3} . \\
\text { Hence } \frac{P A}{P B} = \sqrt{\frac{4}{4 + 2 \sqrt{3}}} = \frac{2}{\sqrt{3} + 1} = \sqrt{3} - 1 .
\end{array}
$$