Generally speaking, you would draw the small-signal schematic and solve for the input impedance using regular KCL/KVL equations.
But looking at the shape of the equation, I'd say they used Middlebrook's Extra-Element Theorem on \$r_0\$. In other words, you first determine the input impedance of the following circuit without \$r_0\$ (ie. \$r_0 \to \infty\$).
simulate this circuit – Schematic created using CircuitLab
$$Z_{in}^\infty = 2R_{icm}^\infty = \frac{V}{i_B}$$
$$\begin{align}
i_B &= \frac{V}{2R_{EE}} - \beta i_B \\
&\Downarrow \\
i_B &= \frac{V}{(1+\beta) 2R_{EE}}\approx\frac{V}{2\beta R_{EE}} \\
&\Downarrow \\
R_{icm}^\infty &\approx \beta R_{EE}
\end{align}$$
We can find the driving point impedances in a relatively simple way.
simulate this circuit
$$\begin{align}
Z_n &= \frac{R_C}{1+\beta} \approx \frac{R_C}{\beta} \\
Z_d &= R_C + 2R_EE \\
R_{icm} &= R_{icm}^\infty\frac{1 + \frac{Z_n}{r_0}}{1 + \frac{Z_d}{r_0}}
&\Downarrow \\
R_{icm} &\approx \beta R_{EE}\frac{1 + \frac{R_C}{\beta r_0}}{1 + \frac{R_C + 2R_{EE}}{r_0}}
\end{align}$$