finding the output resistance of npn current mirror
First, notice that in the text we can clearly read that for \$I_{C1} = 1\textrm{mA}\$ we have \$V_{BE} = 0.7\textrm{V}\$ But now we have \$I_{C2} = 10 \mu \textrm{A}\$ So the transistor \$V_{BE}\$ will be equal to: 

$$\Delta V_{BE} = V_T \cdot \textrm{ln}\left(\frac{I_{C1}}{I_{C2}}\right) = 25\textrm{mV}\cdot \textrm{ln}\left(\frac{1\textrm{mA}}{10\mu\textrm{A}}\right) \approx 115.13\textrm{mV} $$

So we have \$V_{BE} = 0.7\textrm{V} - 115.13\textrm{mV}\approx 585\textrm{mV} \$

And the resistor will be in the range of \$ R = \frac{585\textrm{mV}}{10\mu\textrm{A}} \approx 58.5\textrm{k}\Omega \$ 

Now the small signal equivalent circuit. 
By now it should be obvious for you that \$Q_1\$ and \$Q_2\$ are diode-connected BJT's. And their small-signal equivalent circuit is 

\$r_d = \frac{1}{gm}||r_\pi||r_o \approx \frac{1}{gm} = \frac{10\mu A}{25mV}= 2.5\textrm{k}\Omega\$ 

\$r_o = \frac{V_A}{I_C} = \frac{40V}{10\mu A} = 4\textrm{M}\Omega \$ 

\$r_\pi = \frac{\beta}{g_m} = \frac{100}{0.4mS} = 250\textrm{k}\Omega\$

Hence the small signal circuit will look like this: 







simulate this circuit &ndash; Schematic created using CircuitLab

I omitted \$r_{o1}\$ and \$r_{o2}\$ on purpose (\$r_{o}&gt;&gt;\frac{1}{g_m}\$).

For this circuit we can write this KVL 

$$V_X = (I_X - g_m \cdot v_{be})r_o + I_x\left(R||(r_\pi+r_{d1}+r_{d2})\right)  $$

If we use

\$Rz = R||(r_\pi+r_{d1}+r_{d2})\$ and \$R_B = r_\pi+r_{d1}+r_{d2}\$

will have  

$$V_X = (I_X - g_m \cdot v_{be})r_o + I_x Rz$$

And vbe voltage is equal to: 

\$\large v_{be} = - I_X \cdot Rz \cdot \frac{r_\pi}{R_B}\$

So our equation becomes: 

$$V_X = \left(I_X - g_m \cdot(- I_X \cdot Rz \cdot \frac{r_\pi}{R_B})\right)r_o + I_x Rz$$ 

$$V_X = \left(I_X -(- I_X \cdot Rz \cdot \frac{r_\pi}{R_B} \cdot  g_m)\right)r_o + I_x Rz$$    

$$V_X = \left(I_X + I_X \cdot Rz \cdot \frac{r_\pi}{R_B} \cdot  g_m\right)r_o + I_x Rz$$    

$$V_X = I_X \left(r_o + Rz \cdot \frac{r_\pi}{R_B} \cdot g_m \cdot r_o + Rz \right)$$  

$$R_{out} = \frac{V_X}{I_X} = r_o + Rz \cdot \frac{r_\pi}{R_B} \cdot  g_m \cdot r_o + Rz$$ 

$$ = \frac{V_X}{I_X} = r_o \left(1 + Rz \cdot \frac{r_\pi}{R_B} \cdot  g_m \right) + Rz$$ 

$$R_{out} = r_o\left(1 + R||(r_\pi+r_{d1}+r_{d2}) \cdot \frac{r_\pi}{r_\pi+r_{d1}+r_{d2}} \right)+R||(r_\pi+r_{d1}+r_{d2}) $$

And we are done here. 

$$R_{OUT} = 4\textrm{M}\Omega\left( 1 + \frac{1}{\frac{1}{58.5\textrm{k}\Omega} + \frac{1}{255\textrm{k}\Omega}}\cdot \frac{250\textrm{k}\Omega}{255\textrm{k}\Omega} \cdot 0.4\textrm{mS}\right)+\frac{1}{\frac{1}{58.5\textrm{k}\Omega} + \frac{1}{255\textrm{k}\Omega}}=78.688\textrm{M}\Omega$$