For neutralization, no. of gram equivalents of the acid should be equal to no. of gram equivalents of the base.
No. of gram equivalents of NaOH $ = \frac{40}{1000} = 0.125$
$ = 5 \times 10^{-3}$
Now, $ \frac{w}{eq.mass\, of\, acid}= 5 \times 10^{-3} $
$ \therefore $ Eq.mass of acid = $ \frac{0.3}{5 \times 10^{-3}} = 60 $