Solving for the Voltage Gain in Cascaded Two-Stage Amplifier
Givem gm is 0.01 mho [or 100 ohms emitter 'reac'], knowing gm = 1A/V at 26mA, we know your Ic is 0.26mA in each transistor. With beta=100, the rin of each transistor is (100=B * 100=reac) = 10,000 ohms.

The load on collector of Q1 is 40Kohm || (30Kohm + 10Kohm) = 20Kohm.
Gain of stage1 is gm * effectiveRC (ignoring Vearly effects), thus 0.01 * 20K == 200x. Scaled by voltage division of Rb1 and beta*reac = 4:1, thus only 50X.

The load on collector of Q2 is 4Kohm. Av is gm*Rc = 0.01 * 4K = 40X. But again we have that input 4:1 divider, so only 10X.

Total gain is 50 * 10 = 500x.