2. If the hypotenuse of a right triangle is 5, and the radius of the inscribed circle is 1, then the area of the triangle is ( ).
(A) 5
(B) 6
(C) 7
(D) 8
2. B.

Let the lengths of the two legs be $a, b$. Also, the hypotenuse length $c=5$, and the inradius $r=1$. From $r=\frac{1}{2}(a+b-c)$ and $a^{2}+b^{2}=c^{2}$, we get
$$
\begin{array}{l}
S_{\triangle A B C}=\frac{1}{2} a b=\frac{1}{2} \cdot \frac{(a+b)^{2}-\left(a^{2}+b^{2}\right)}{2}=\frac{1}{4}[(2 r \\
\left.+c)^{2}-c^{2}\right]=r^{2}+c r=6 .
\end{array}
$$