Matched biased transistor circuit
To calculate the current in Q2 we need to first determine the bias for Q1.

If we make an assumption that the voltage across Q1 is 0.7V.  The current through the 180 ohm resistor in Q1 emitter is (20-0.7)/(20000+180) = 0.95mA.

The same current will flow through Q2 because of symmetry.

The effective emitter resistance of Q2 will be 1000/(40*0.95)+180 = 206 ohms

The gain for Q2 will be Rc/Re = 10000/206 = 48.5.

This neglects Early effect, parasitic capacitances and assumes that C is large enough to have negligible impedance at the frequency of operation.