In this type of questions , we first find LCM of given numbers and then subtract common value to get the answer.
Common value = Number - Remainder
So,
20–14 =6
25–19=6
35–29=6
40–34 = 6
Now LCM of 20, 25, 35 and 40 -
20 = 2^2 * 5
25 = 5^2
35 = 5*7
40 = 2^3 * 5
therefore LCM = 2^3 * 5^2 * 7 = 1400
As i wrote above to get the final answer we have to subtract common value from LCM.
Final answer = 1400 - 6 = 1394