How do I calculate the aircraft's deviation from track in this exam question?
Pretty easy... You are 225° QDM, the track was 245°. Neither QDM nor MKK is nothing about variation or deviation, because both of them are magnetic (i. e. variation already applied) courses (i. e. not heading, therefore deviation is also not an issue).

20° deviation from track at 30 km to the station gives us 30 * sin(20°) = 10.26 km, i. e. approximately 10 km. Our QDM is less than desired track, and we are moving to the South-West, so we are to the North-West of our desired track, i. e. we are on the right side of the desired track. Therefore, the answer is 1, right of track 10km (5.4 nm) (Nk=+10km).