5. As shown in Figure 2, in $\triangle A B C$, $\angle C=$ $90^{\circ}, B C=a, C A=b$, $A B=c$, the two angle bisectors $A E$ and $B F$ intersect at point 0. Then $\frac{S_{\triangle O E F}}{S_{\triangle O A B}}=(\quad)$.
(A) $\frac{a+b-c}{a+b+c}$
(B) $\frac{a-b+c}{a+b+c}$
(C) $\frac{-a+b+c}{a+b+c}$ 
(D) $\frac{2 c-a-b}{a+b+c}$
5.A.

From the properties of the incenter, we have
$$
\frac{O E}{O A}=\frac{a}{b+c}, \frac{O F}{O B}=\frac{b}{a+c} \text {. }
$$

Since $c^{2}=a^{2}+b^{2}$, we have
$$
\begin{array}{l}
\frac{S_{\triangle O E F}}{S_{\triangle O A B}}=\frac{O E \cdot O F}{O A \cdot O B}=\frac{a b}{(b+c)(a+c)} \\
=\frac{2 a b}{2\left(a b+a c+b c+c^{2}\right)}=\frac{2 a b}{a^{2}+b^{2}+c^{2}+2 a b+2 b c+2 a a} \\
=\frac{(a+b+c)(a+b-c)}{(a+b+c)^{2}}=\frac{a+b-c}{a+b+c} .
\end{array}
$$