When 2 words in a row contains "s" at the end, you put an apostrophe at the end of the first word containing "s" at the end in that specific word
In, "I watched a trees' branches sway in the wind," "trees" and "branches" are the words containing s at the end of the word in a row.
And the first word containing s at the end is "trees," so you put in an apostrophe as it is in choice D
So yes, i agree with what the other one says. It is D.