4. $\frac{9}{35}$.

A valid way of selection is equivalent to the total denomination $a$ of the two bills taken from $A$ being less than the total denomination $b$ of the two bills taken from $B$, thus, $aa=2$, meaning the two bills taken from $B$ cannot both be 1 yuan bills, which corresponds to $\mathrm{C}_{7}^{2}-\mathrm{C}_{3}^{2}=18$ ways of selection.
Therefore, the required probability is
$$
\frac{3 \times 18}{\mathrm{C}_{5}^{2} \mathrm{C}_{7}^{2}}=\frac{54}{10 \times 21}=\frac{9}{35} .
$$

By the properties of the hyperbola,
$$
\begin{array}{l}
F_{1} F_{2}=2 \sqrt{1+3}=4, \\
P F_{1}-P F_{2}=Q F_{1}-Q F_{2}=2 . \\
\text { Given } \angle F_{1} P Q=90^{\circ} \\
\Rightarrow P F_{1}^{2}+P F_{2}^{2}=F_{1} F_{2}^{2} \\
\Rightarrow P F_{1}+P F_{2} \\
\quad=\sqrt{2\left(P F_{1}^{2}+P F_{2}^{2}\right)-\left(P F_{1}-P F_{2}\right)^{2}} \\
\quad=\sqrt{2 \times 4^{2}-2^{2}}=2 \sqrt{7} .
\end{array}
$$

Thus, the inradius of the right triangle $F_{1} P Q$ is
$$
\begin{aligned}
r & =\frac{1}{2}\left(F_{1} P+P Q-F_{1} Q\right) \\
& =\frac{1}{2}\left(P F_{1}+P F_{2}\right)-\frac{1}{2}\left(Q F_{1}-Q F_{2}\right) \\
& =\sqrt{7}-1 .
\end{aligned}
$$
4. Bag $A$ contains two 10-yuan banknotes and three 1-yuan banknotes, and bag $B$ contains four 5-yuan banknotes and three 1-yuan banknotes. Now, two banknotes are randomly drawn from each of the two bags. Then the probability that the sum of the remaining banknotes in $A$ is greater than the sum of the remaining banknotes in $B$ is