Question on circles inscribed in a rectangle In rectangle $ABCD$, $AB = 8$ and $BC = 20$. Let $P$ be a point on $AD$ such that angle $\measuredangle BPC = 90^\circ$. If $r_1, r_2, r_3$ are the radii of the incircles of triangles $APB, BPC$ and $CPD$, what is the value of $r_1 + r_2 + r_3$?
 A: Given the inradius equation for a right triangle, as hinted by @Joey, just replace the variables:
$$
\begin{eqnarray}
r_1 &=& \frac{AB + AP - BP}{2} \\
r_2 &=& \frac{CD + DP - CP}{2} \\
    &=& \frac{AB + (BC - AP) - CP}{2} \\
r_3 &=& \frac{BP + CP - BC}{2} \\
\end{eqnarray}
$$
And then simplify:
$$
\begin{eqnarray}
R &=& r_1 + r_2 + r_3 \\
  &=& \frac{AB + AP - BP}{2} +
              \frac{AB + (BC - AP) - CP}{2} +
              \frac{BP + CP - BC}{2} \\
  &=& AB \\
\end{eqnarray}
$$
So the total radii of the incircles is 8.
A: Hint: If $a$, $b$, and $c$ are the side lengths of a right triangle, with $c$ the length of the hypotenuse, then the radius of the incircle is given by
$$ r = \frac{a+b-c}{2}. $$
One way to see this is to realize that the radius in this case is equal to the length of the tangent from the right angle vertex to the incircle, and do a bit of fairly simple algebra to get the result, noting that the length of two tangents from a point are equal.
Another way to see this is the following: Note that the area of a triangle is given by $rs$, where $s$ is the semi-perimeter, and in the case of a right triangle, it is also $\frac{1}{2}ab$. We thus have
$$ rs = A = \frac{ab}{2}\implies r = \frac{ab}{2s} = \frac{ab}{a+b+c}. $$
Note that
$$ a+b+c = \frac{(a+b)^2 - c^2}{a+b - c} = \frac{a^2+b^2+ 2ab-c^2}{a+b-c} = \frac{2ab}{a+b-c}$$
and hence
$$ r = ab\left(\frac{a+b-c}{2ab}\right) = \frac{a+b-c}{2} $$
as desired. Now, each of the triangles in question are right triangles, and the side lengths can be calculated, so the answer can be found using this relation.
