Since f(x) is continous on [4,5], by the mean value theorem there exists a point c such that f'(c)=(f(5)-f(4))/(5-4). Since it is true that -2≤f'(x)≤4 for all x in (4,5) it is especially true that -2≤f'(c)≤4. So -2≤(f(5)-f(4))/(5-4)≤4. Since 5-4=1 we get
-2≤f(5)-f(4)≤4.