1) All trees of a single farmer bore equal number of fruits i.e say 1st farmer has 7 trees and each tree bears 'a' number of fruits. Therefore 1st farmer will have 7a apples.

2) Similarly 2,3,4,5 farmers will have 9b,11c,13d,14e apples respectively.

3)Now third farmer gives one apple to the first
Hence 11c-1 = 7a+1
Also the fifth gives three to each of the second and the fourth
Hence 14e-6=9b+3=13d+3

4) Since after doing this all have exactly the same number of apples
we can say 14e-6=7a+1
Thus 14e-7a=7 i.e. 2e-a=1

Now put a=17 Thus e=9
5) Now put the above values in step 3, we get c=11, d=9, b=13 Thus a=17, b=13, c= 11, d= 9, e=9.

These are the apples yielded per tree for each farmer. If you put these values in step 3, you'll see that each farmer will have 120 apples.