$P$ is a point inside the square $A B C D$ such that $P A=1, P B=2$ and $P C=3$. What is the measure of the angle $A \hat{P} B$?

![](https://cdn.mathpix.com/cropped/2024_05_01_874784cb479b0f26034ag-3.jpg?height=365&width=322&top_left_y=457&top_left_x=707)

Figure 119.1
Let $Q$ be a point such that the triangles CQB and APB are congruent, as shown in the figure. This is equivalent to rotating the triangle APB with center at B and angle $90^{\circ}$ clockwise. In particular, we have that $\mathrm{PBQ}=90^{\circ}$. Thus, $\mathrm{PQ}^{2}=$ $\mathrm{PB}^{2}+\mathrm{BQ}^{2}=2^{2}+2^{2}$, from which $\mathrm{PQ}=2 \sqrt{2}$.

On the other hand,

$$
\mathrm{PC}^{2}=9=8+1=\mathrm{PQ}^{2}+\mathrm{QC}^{2}
$$

and it follows that the triangle PCQ is right-angled with the right angle at Q.

Therefore, $\mathrm{A} \hat{\mathrm{PB}}=\mathrm{B} \hat{\mathrm{Q} C}=\mathrm{B} \hat{\mathrm{QP}}+\mathrm{PQ} \mathrm{Q}=45^{\circ}+90^{\circ}=135^{\circ}$.

## Related Problem

Let $P$ be a point inside the equilateral triangle $A B C$ such that:

$$
\mathrm{PA}=5, \quad \mathrm{~PB}=7, \quad \text { and } \quad \mathrm{PC}=8
$$

Determine the measure of the side of the triangle $A B C$.

Hint: For item (b), order the points with integer coordinates in_ascending order of distance to $(\sqrt{2}, 1 / 3)$.

Helpful Facts: The distance between the points $\left(x_{1}, y_{1}\right)$ and $\left(x_{2}, y_{2}\right)$ is given by the expression

$$
\sqrt{\left(x_{1}-x_{2}\right)^{2}+\left(y_{1}-y_{2}\right)^{2}}
$$

The product of a non-zero rational number and an irrational number is an irrational number.