Example $7 P$ is a point inside square $A B C D$, and $P A: P B: P C=1: 2: 3$. Find $\angle A P B$.
Explanation: The conditions of this problem only determine the shape of the figure (the ratio of segments and angles). As shown in Figure 6, let the side length of the square be \( a \), and \( PA = m \) be a parameter (the ratio of the two is a constant). Therefore,
\[
\begin{array}{c}
PB = 2m, \, PC = 3m. \\
\text{Then } \sin \angle APB \\
= \frac{a \sin \angle PBA}{m} \\
= \frac{a}{m} \cos \angle PBC \\
= \frac{a}{m} \cdot \frac{a^2 + (2m)^2 - (3m)^2}{2a \cdot 2m} = \frac{a^2 - 5m^2}{4m^2}, \\
\cos \angle APB = \frac{m^2 + (2m)^2 - a^2}{2m \cdot 2m} = \frac{5m^2 - a^2}{4m^2}.
\end{array}
\]

Thus, \(\tan \angle APB = -1\), \(\angle APB = 135^\circ\).