TL431 Type2 Compensator derivation
Can someone tell me how to get the red line equation?

The opto-coupler's collector terminal is equivalent to a current source (and not a voltage source). As a current source, it is effectively in parallel with \$R_{pullup}\$. A current source in parallel with a resistor is equivalent to a voltage source in series with that same resistor hence, the output of the opto-coupler is equivalent to this: -



simulate this circuit &ndash; Schematic created using CircuitLab
So, the transfer function of the resistor and capacitor are this: -
$$\dfrac{\frac{1}{sC_2}}{R_{pullup}+\frac{1}{sC_2}} = \dfrac{1}{1 + sC_2 R_{pullup}}$$
That is the redline term in your equation.