Hi Sameh,
I think the answer of 42 days is wrong. The only way I get to 42 is if I treat the FF-2 as a FS-2, in which case I get 20+10+(5-2)+(6+3)=42.
In my opinion the answer should be 37 days. 20+10+(6+3-2)=37. Because of the FF relationship between tasks 2 & 3, the duration of task 3 does not come into play. Task 2 starts on day 21, and finishes on day 31, which means task three had to end on day 29 (FF-2) and thus started 5 days earlier on day 24. The next dependency is between tasks 3 & 4 (FS +3), which means task 4 will only start 3 days after task three ended, which was on day 29 resulting in task 4 only starting o day 32, which brings milestone B in at day 37 them.
Regards