Momentum is conserved, so the sum of the momenta of the bullet and block before collision is equal to the momentum of the combined bullet-block system,
[tex]m_bv_b+m_wv_w = (m_b+m_w)v[/tex]
where v is the speed of the bullet-block system. The block starts at rest so it has no initial momentum, and solving for v gives
[tex]v = \dfrac{m_b}{m_b+m_w} v_b[/tex]
The total work W performed by the spring on the bullet-block system as it is compressed a distance x is
[tex]W = -\dfrac12kx^2[/tex]
where k is the spring constant, and the work done is negative because the restoring force of the spring opposes the bullet-block as it compresses the spring.
By the work-energy theorem, the total work done is equal to the change in the bullet-block's kinetic energy ∆K, so we have
[tex]W_{\rm total} = W = \Delta K[/tex]
The bullet-block starts moving with velocity v found earlier and comes to a stop as the spring slows it down, so we have
[tex]-\dfrac12kx^2 = -\dfrac12(m_b+m_w)v^2 \implies kx^2 = \dfrac{{m_b}^2}{m_b+m_w}{v_b}^2[/tex]
Solve for [tex]m_w[/tex]:
[tex]m_w=\dfrac1k\left(\dfrac{m_bv_b}x\right)^2-m_b[/tex]
[tex]m_w=\dfrac1{205\frac{\rm N}{\rm m}}\left(\dfrac{(0.0135\,\mathrm{kg})\left(245\frac{\rm m}{\rm s}\right)}{0.350\,\rm m}\right)^2-0.0135\,\mathrm{kg}\approx \boxed{0.422\,\mathrm{kg}}[/tex]