IN CMOS and small-signal analysis, the cascode output resistance is approx. equal to ro_base*gm_cascode*ro_cascode, where base means the transistors that is under the cascode one.
The upper cascode just about equalise the drain voltages of the lower current mirror, but it itself has finite output impedance.
Hence, the impedance at the source when reflected into the drain is multiplied upwards by the gain of the cascode.
As u can see (from the equations you were given) output resistance is found from small signal model (since it depends on small signal parameters).
The formulas you got are aprox. and good in most cases, but u should solve your small signal model for complete solution (in some cases - as integrated techs - may be that your output resistance of transistor/or its gain is not high enough to neglect other terms in formulae).