$$E= -(13.6 \ eV)Z^2 \bigg( \dfrac{1}{(Z+2)^2} - \dfrac{1}{Z^2} \bigg) $$
$$ = -13.6 \times \bigg( \dfrac{Z^2 -(Z+2)^2}{(Z+2)^2} \bigg) = \dfrac{4(Z+1) \times 13.6}{(Z+2)^2} \ eV $$
Now energy of electron is $$ K = \dfrac{h^2}{2 \lambda^2 m} $$
Solving $$ K = 6 \ eV $$
So, $$ \dfrac{4(Z+1) \times 13.6 }{(Z+2)^2} = 6+4.2 = 10.2 \ eV$$
$$ \dfrac{Z+1}{(Z+2)^2} = \dfrac{3}{16} \implies (Z-2)(3Z+2) = 0 $$
So, the value of $$Z=2$$ (neglecting the negative/fractional value)