How was the folded cascode stage used to raise the output resistance of the pnp?
In this circuit Q4 working as a common-base amplifier thus, we can use this super simplified small-signal equivalent circuit:



simulate this circuit &ndash; Schematic created using CircuitLab
The output resistance is equal to:
$$R_O = \frac{V_X}{I_X}$$
Thus the \$I_X\$ current is equal to:
$$I_X = I_{ro} - I_C = \frac{V_X}{r_o} - \frac{\frac{V_X}{r_o}}{\beta +1}*\beta = \frac{V_X}{r_o} - \frac{V_X \beta}{(\beta +1) r_o} = V_X \left(\frac{1}{r_o} - \frac{ \beta}{(\beta +1) r_o}\right)=$$
$$I_X = V_X \left(\frac{\beta +1}{(\beta +1) r_o} - \frac{ \beta}{(\beta +1) r_o}\right) =  V_X \left(\frac{1}{(\beta +1) r_o}\right)$$
Therefore
$$R_O = \frac{V_X}{I_X} = (\beta +1)r_o \approx \beta r_o$$
You can also look here at this example:
finding the output resistance of bjt folded cascode