Hello Vivek,
Since the relationship is
Finish - to - Finish, The activity (
has duration of 5 days with 3 days Lag. The total duration for activity (
is 8 days. However, activity (A) has 7 days duration which is less than Activity B. Thus the total duration for both activities is 8 days.
Best way to understand the scenario is to draw two nodes namely A and B and draw the relationship between them, you will be able to figure it out as I did