The best way to unite sentences 4 and 5 are using option B) Royalty there demanded protection from the sun, and people developed the umbrella for this purpose.
In this case, we are joining two sentences with the coordinating conjunction "and" since both ideas are related to each other.
The grammar structure of option B is clear and shows cohesion whereas the rest of the options are complex and not clear to what the focus is.
The importance of the sentence is to highlight that royalty demanded an umbrella rather that on who developed it (people).
Hope this helps!