I'm taking medical physiology and of course, none of the equations are properly explained. The closest I've been able to get is this page. Even here however, steps from equations 14 to equation 15 is waved away as "careful algebraic manipulations").
What exacly is happening here?
We start with
$$RQ=\frac{\frac{F_ACO_2}{1-F_IO_2-F_ACO_2}}{\frac{F_IO_2}{1-F_IO_2}-\frac{F_AO_2}{1-F_AO_2-F_ACO_2}}$$
and we're supposed to end up with:
$$F_AO_2=F_IO_2-F_ACO_2(F_IO_2+\frac{(1-F_IO_2)}{RQ})$$
What I've done so far is to try to isolate $F_AO_2$ on one side, so:
$$RQ=\frac{\frac{F_ACO_2}{1-F_IO_2-F_ACO_2}}{\frac{F_IO_2}{1-F_IO_2}-\frac{F_AO_2}{1-F_AO_2-F_ACO_2}}$$
$$=>\frac{F_IO_2}{1-F_IO_2}-\frac{F_AO_2}{1-F_AO_2-F_ACO_2}=\frac{\frac{F_ACO_2}{1-F_IO_2-F_ACO_2}}{RQ}$$
$$=>-\frac{F_AO_2}{1-F_AO_2-F_ACO_2}=\frac{\frac{F_ACO_2}{1-F_IO_2-F_ACO_2}}{RQ}-\frac{F_IO_2}{1-F_IO_2}$$
$$=>\frac{F_AO_2}{1-F_AO_2-F_ACO_2}=\frac{F_IO_2}{1-F_IO_2}-\frac{F_ACO_2}{(1-F_IO_2-F_ACO_2)RQ}$$
$$=>F_AO_2=\frac{F_IO_2*(1-F_AO_2-F_ACO_2)}{1-F_IO_2}-\frac{F_ACO_2(1-F_AO_2-F_ACO_2)}{(1-F_IO_2-F_ACO_2)RQ}$$
From here I'm however not sure how to proceed. I have tried to run this both with chatGPT and with Gemini, but neither seems to return useful results.
You seem to have made a copying mistake, the correct formula is:
$$RQ=\frac{\frac{F_{A_{CO_2}}}{1-F_{A_{O_2}}-F_{A_{CO_2}}}}{\frac{F_{I_{O_2}}}{1-F_{I_{O_2}}}-\frac{F_{A_{O_2}}}{1-F_{A_{O_2}}-F_{A_{CO_2}}}}$$
Pay attention to the denominator of the numerator.
Let's simplify the formula somewhat:
$$RQ=\frac{F_{A_{CO_2}}}{\frac{F_{I_{O_2}}}{1-F_{I_{O_2}}}({1-F_{A_{O_2}}-F_{A_{CO_2}}})-F_{A_{O_2}}}$$
This you obtain by multiplying numerator and denominator by ${1-F_{A_{O_2}}-F_{A_{CO_2}}}$.
Then rearranging:
$$\frac{F_{I_{O_2}}}{1-F_{I_{O_2}}}({1-F_{A_{O_2}}-F_{A_{CO_2}}})-F_{A_{O_2}} = \frac{F_{A_{CO_2}}}{RQ} $$
Working out the left hand side, grouping terms containing $F_{A_{O_2}}$:
$$\frac{F_{I_{O_2}}}{1-F_{I_{O_2}}}({1-F_{A_{CO_2}}})-\frac{1}{1-F_{I_{O_2}}}F_{A_{O_2}} = \frac{F_{A_{CO_2}}}{RQ} $$
Multiplying both sides by $1-F_{I_{O_2}}$
$$F_{I_{O_2}}({1-F_{A_{CO_2}}})-F_{A_{O_2}} = (1-F_{I_{O_2}})\frac{F_{A_{CO_2}}}{RQ} $$
or after rearranging some more
$$F_{A_{O_2}} = F_{I_{O_2}}({1-F_{A_{CO_2}}}) - (1-F_{I_{O_2}})\frac{F_{A_{CO_2}}}{RQ}$$
and finally
$$F_{A_{O_2}} = F_{I_{O_2}}-F_{A_{CO_2}}\left(F_{I_{O_2}} + \frac{1-F_{I_{O_2}}}{RQ}\right) \; .$$