2. As shown in Figure 1, in the right triangle $\triangle ABC (\angle C=90^{\circ})$, there are three squares with side lengths $a$, $b$, and $c$ respectively. Then the relationship satisfied by $a$, $b$, and $c$ is ( ).
(A) $a+c=b$
(B) $a c=b^{2}$
(C) $a^{2}+c^{2}=b^{2}$
(D) $\frac{1}{b}+\frac{1}{c}=\frac{1}{a}$
2. A.

Obviously, Rt $\triangle D E F \backsim \mathrm{Rt} \triangle H G M$. Then
$$
\begin{array}{l}
\frac{D E}{H G}=\frac{E F}{G M} \Rightarrow \frac{a}{b-c}=\frac{b-a}{c} \\
\Rightarrow a c=(b-a)(b-c) \\
\Rightarrow b(a+c)=b^{2} .
\end{array}
$$

Since $b \neq 0$, thus, $a+c=b$.