Answer
$1.02\times10^{-21}\;\rm kg$
Work Step by Step
The cantilever here works as a spring and then it must have a spring constant $k$ and this is unchangeable whether we attached the DNA molecule or not.
The spring constant is given by
$$\omega=\sqrt{\dfrac{k}{m}}$$
where $\omega=2\pi f$
where $f$ is the frequency.
So that
$$2\pi f =\sqrt{\dfrac{k}{m}}$$
And in the first case, without attaching the DNA:
$$2\pi f _1=\sqrt{\dfrac{k}{m_1}}$$
where $m_1=\frac{1}{3}M$ where $M$ is the mass of the vibrating cantilever.
$$2\pi f_1=\sqrt{\dfrac{3k}{M}}\tag 1$$
In the second case, when attaching the DNA:
$$2\pi f _2=\sqrt{\dfrac{k}{m_2}}$$
where $m_2=\frac{1}{3}M+m$ where $m$ is the mass of the DNA.
$$2\pi f _2=\sqrt{\dfrac{k}{\frac{1}{3}M+m}}\tag 2$$
We are given that $f_1-f_2=50\;\rm Hz$, so $f_2=f_1-50$
Plugging into (2);
$$2\pi (f_1-50)=\sqrt{\dfrac{k}{\frac{1}{3}M+m}}\tag 3$$
Divide (1) by (3);
$$\dfrac{2\pi f_1}{2\pi (f_1-50)}=\dfrac{\sqrt{\dfrac{3k}{M}}}{\sqrt{\dfrac{k}{\frac{1}{3}M+m}}}$$
$$\dfrac{ f_1}{ f_1-50}=\sqrt{\dfrac{{\dfrac{3k}{M}}}{{\dfrac{k}{\frac{1}{3}M+m}}}}$$
$$\dfrac{ f_1}{ f_1-50}=\sqrt{ {\dfrac{3 \color{red}{\bf\not} k}{M}} \dfrac{[\frac{1}{3}M+m]}{ \color{red}{\bf\not} k}}$$
$$\dfrac{ f_1}{ f_1-50}=\sqrt{ {\dfrac{M+3m }{M}} }$$
Squaring both sides;
$$\dfrac{ f_1^2}{( f_1-50)^2}= {\dfrac{M+3m }{M}} $$
Hence,
$$\dfrac{ M f_1^2}{( f_1-50)^2}-M= 3m $$
$$m=\dfrac{ M f_1^2}{3( f_1-50)^2}-\dfrac{M}{3}\tag 4$$
Now we need to find the mass of the cantilever $M$ which is given by the density law;
$$M=\rho V=\rho Ah$$
$$M=2300\;\rm \frac{kg}{m^3}(4000\;\times 10^{-9}\;m)(400\times 10^{-9}\;m)(100\times 10^{-9}\;m)$$
$$M=\bf 3.68\times 10^{-16}\;\rm kg$$
Plugging into (4) and plug the other known $f_1=12\times 10^6\;\rm Hz$
$$m=\dfrac{ (3.68\times 10^{-16})(12\times 10^6)^2}{3( [12\times 10^6]-50)^2}-\dfrac{(3.68\times 10^{-16})}{3} $$
$$m=\color{red}{\bf 1.02\times10^{-21}}\;\rm kg$$