For this, we use the ICE method! Now, ICE stands for Initial, Change, at Equilibria. So, the table looks like this:
2SO2 O2 2SO3
I 0.2 0.4 0.7
C ? ? ?
E ? ? 0.3
Basically, I've just taken the amounts from the question, and filled them out above so that we can visualise what's happening. From here, we know that the change for 2SO3 is going to be -0.4 mol - because we "lost" 0.4 mol of compound.
2SO2 O2 2SO3
I 0.2 0.4 0.7
C ? ? -0.4
E ? ? 0.3
Now, if we "lost" something, it has to go somewhere - and so, it will become the other molecules! But, remember your stoichiometry (which is why I wrote it up there next to the atoms!). SO3 and SO2 have the same mole coefficients, so they'll change the same amount - but 0.4 mole of SO3 is only going to make 0.2 mole of O2! On top of that, we LOST 2SO3 (-ve sign), which means we must GAIN O2 and 2SO2 (+ve sign)
2SO2 O2 2SO3
I 0.2 0.4 0.7
C +0.4 +0.2 -0.4
E ? ? 0.3
Now, we can finish off the table to find out how much we had at equilibria:
2SO2 O2 2SO3
I 0.2 0.4 0.7
C +0.4 +0.2 -0.4
E 0.6 0.6 0.3
And now, we know how much we had at equilibria, and so can use the usual K equation to find out what the equilibrium constant is.