Union of connected subsets

Problem: Let , , and be connected subsets of X, such that and . Prove that is connected.

So far this is what I have:

Assume is disconnected, then .

Edit: Forgot to include

Therefore , ,

Thus

Now, I'm not 100% sure if I have been approaching this correctly, but I think from here I have to show for one of the 3 connected subsets its intersection with U and Y is nonempty and thus it is disconnected meaning there is a contradiction, but I am not sure how to prove this part.