4. As shown in Figure 1, in the acute triangle $\triangle ABC$, the sides opposite to the interior angles $\angle A$, $\angle B$, and $\angle C$ are $a$, $b$, and $c$ ($a > b > c$), respectively. If the side $PQ$ of the inscribed square $PQRS$ in the acute triangle $\triangle ABC$ lies on the side $a$ of $\triangle ABC$, and the other two vertices $R$ and $S$ are on sides $b$ and $c$, respectively, then the side length of the square $PQRS$ is denoted as $x_{a}$. Similarly, define $x_{b}$ and $x_{c}$. Then the relationship in size among $x_{a}$, $x_{b}$, and $x_{c}$ is ( ).
(A) $x_{a}=x_{b}=x_{c}$
(B) $x_{a}<x_{b}<x_{c}$
(C) $x_{b}<x_{a}<x_{c}$
(D) $x_{c}<x_{b}<x_{a}$
4. B.

Let $A H \perp B C$ at point $H, A G \perp S R$ at point $G$, and the heights on $a, b, c$ be $h_{a}, h_{b}, h_{c}$ respectively.
From the square $P Q R S \Rightarrow R S / / B C$
$$
\begin{array}{l}
\Rightarrow \triangle A S R \backsim \triangle A B C \Rightarrow \frac{A G}{A H}=\frac{S R}{B C} \\
\Rightarrow \frac{A H-G H}{A H}=\frac{S R}{B C} \\
\Rightarrow \frac{h_{a}-x_{a}}{h_{a}}=\frac{x_{a}}{a} \\
\Rightarrow x_{a}=\frac{a h_{a}}{a+h_{a}}=\frac{2 S_{\triangle A B C}}{a+h_{a}} .
\end{array}
$$

Similarly, $x_{b}=\frac{2 S_{\triangle A B C}}{b+h_{b}}, x_{c}=\frac{2 S_{\triangle A B C}}{c+h_{c}}$.
Given $a>b>c$, we know $h_{a}b, h_{b}$ is the height on side $b$, so, $h_{b}0 \\
\Rightarrow a+h_{a}>b+h_{b} \\
\Rightarrow x_{a}<x_{b} .
\end{array}
$$

Similarly, $x_{b}<x_{c}$.
Therefore, $x_{a}<x_{b}<x_{c}$.