For the 20kg block choose downward as positive and for the 30kg block choose the x axis along the incline as positive.Apply Newton's second law of motion to each block separately.The pulley is frictionless and the tension is the same on either side of the pulley. We can eliminate tension from the two equations of motion and solve to find the acceleration of the 20kg block. Using this acceleration we can calculate distance travelled in 2 seconds using the appropriate 'suvat' equation.