The brightness temperature of a source is defined as T,
$$ \begin{equation} T = \frac{\lambda^2 S}{2 k \Omega}. \end{equation} $$Here $S$, $\lambda$ and $\Omega$ are the flux density,
wavelength of observation and angular extent of the resolution. Note that all units are in MKS.
k=1.38$\times 10^{-23} J/K$
Units of S is $J m^{-2} s^{-1}$
Units of $\lambda$ is $m$
Units of $\Omega$ is $str$
We rewrite the $\Omega$ in terms of major and minor axis of the beam as,
$\Omega = \frac{\pi \theta_{min} \theta_{maj}}{4 ln(2)}$.
Now, we simplify equation for T keeping it in MKS units.
$$
T(K) = \frac{\lambda(m)^{2} S(J m^{-2} s^{-1})}{2\times 1.38 \times 10^{-23} (J/K) \Omega (str)} \\
T(K) = \frac{\lambda(m)^{2} S(J m^{-2} s^{-1})}{2\times 1.38 \times 10^{-23} (J/K)} \times
\frac{4 ln(2)}{\pi \theta_{min}(rad) \theta_{maj}(rad)} \\
T(K) = \frac{\lambda(m)^{2} S(J m^{-2} s^{-1})}{\theta_{min}(rad) \theta_{maj}(rad)} \times
\big(\frac{4 ln(2)}{\pi \times 2\times 1.38 \times 10^{-23}}\big) \\
T(K) = (0.32\times 10^{23})\times\frac{\lambda(m)^{2} S(J m^{-2} s^{-1})}{\theta_{min}(rad) \theta_{maj}(rad)}\\
$$
Note that all units are MKS. In a radio telescope when observing through a beam, the flux density
changes to flux density per beam. The 'pear beam' is mentioned to specify that you are looking through a beam. If you
convert units of $\Omega$ from $str$ to $arcsec^2$, the units of flux density per beam remain same, i.e
$S (J m^{-2} s^{-1}) \to S(J m^{-2} s^{-1}/beam)$.
Now we simplify more, $rad \to arcsec$, $(J m^{-2} s^{-1})\to Jy$, $m\to cm$.
$1 Jy = 10^{-26} J m^{-2} s^{-1} Hz^{-1}$. (Note we use spectral flux density in radio astronomy)
$1 arcsec = 4.85\times 10^{-6} rad$
$$
T(K) = (0.32\times 10^{23})\times\frac{10^{-4}\times \lambda(cm)^{2} 10^{-26}S(Jy/beam)}
{4.85\times 10^{-6} \theta_{min}(arcsec) \times 4.85\times 10^{-6} \theta_{maj}(arcsec)}\\
T(K) = \big(\frac{(0.32\times 10^{23})\times 10^{-4}\times 10^{-26}}{(4.85\times 10^{-6})^2}\big)\times\frac{ \lambda(cm)^{2} S(Jy/beam)}
{\theta_{min}(arcsec) \times \theta_{maj}(arcsec)}\\
T(K) = 1.36\times 10^3 \frac{ \lambda(cm)^{2} S(Jy/beam)}
{\theta_{min}(arcsec) \times \theta_{maj}(arcsec)}\\
T(K) = 1.36 \frac{ \lambda(cm)^{2} S(mJy/beam)}
{\theta_{min}(arcsec) \times \theta_{maj}(arcsec)}\\
$$
If we express in frequency $\nu (GHz)$, we get
$$
T(K) = 1.36 \frac{ (\frac{c (cm/s)}{\nu(Hz)})^{2} S(mJy/beam)}
{\theta_{min}(arcsec) \times \theta_{maj}(arcsec)} \\
T(K) = 1.36 \frac{ 9\times 10^{20}\times S(mJy/beam)}
{10^{18}\times\nu(GHz)^2\theta_{min}(arcsec) \times \theta_{maj}(arcsec)} \\
T(K) = 1224 \frac{ S(mJy/beam)}
{\nu(GHz)^2\theta_{min}(arcsec) \times \theta_{maj}(arcsec)} \\
$$