Step 1: Settle the operating point first.
Replace the base network by its Thevenin equivalent: $V_{th}=12\times\frac{25k}{125k}=2.4$ V and $R_{th}=100k\parallel25k=20k\Omega$. The full emitter leg for DC is $500+1000=1500\Omega$, since a capacitor carries no steady current. Solving the base-emitter loop,
\[ I_B=\frac{2.4-0.7}{20000+100(1500)}=10\ \mu A \]
so $I_C\approx1$ mA and $I_E=1$ mA. From these, $r_e=25/1=25\Omega$ and $r_o=100/0.001=100k\Omega$.
Step 2: Ask a simpler question first, is the $1k\Omega$ ever visible to the signal.
Compare its reactance to $1000\Omega$ at the two given frequencies rather than plugging into a gain formula straight away. At $\omega=10^5$, $X_C=1/(10^5\cdot10^{-5})=1\Omega$; at $\omega=10^7$, $X_C=1/(10^7\cdot10^{-5})=0.01\Omega$. Both are two to five orders of magnitude smaller than $1000\Omega$, so the $10\mu F$ capacitor shorts that resistor out completely at both frequencies. Only the $500\Omega$ resistor, which has no capacitor across it, ever appears in the AC path.
Step 3: Do the same check for the two $100nF$ coupling caps.
At $\omega=10^5$, $X_C=1/(10^5\cdot10^{-7})=100\Omega$; at $\omega=10^7$, $X_C=1/(10^7\cdot10^{-7})=1\Omega$. Since the base side always looks like several $k\Omega$ and the output has no load resistor at all, these small reactances drop no meaningful voltage at either frequency. Both signal components pass through the coupling capacitors essentially untouched.
Step 4: Now write the gain, once, for both frequencies together.
Because steps 2 and 3 show the AC circuit looks identical at $10^5$ rad/s and at $10^7$ rad/s, one gain expression covers both terms:
\[ A_v=-\frac{R_C\parallel r_o}{r_e+500} \]
$R_C\parallel r_o=\dfrac{5000\times100000}{105000}\approx4762\Omega$, so
\[ A_v=-\frac{4762}{525}\approx-9.1 \]
Step 5: Conclude.
Both the low-frequency cosine term and the high-frequency sine term get multiplied by the same $-9.1$.
\[ \boxed{V_o(t)\approx-9.1\left[A\cos(10^5t)+B\sin(10^7t)\right]} \]