I'll get you started with a possible approach:

1. You know the joint pdf of X and Y, f(x,y).

2. Consider the cdf of U.

3. if and if so there are two cases to consider.

Case 1:.

Case 2:.

Therefore:

.

Now integrate f(x, y) over the required regions and calculate each term.

4. The pdf of U is given by .