the sum of two indep U(0,1) is a triangular density

that's 0 when S=X+Y is less than 0 or greater than 2.

It's s on 0<s<1 and it's 2-s on 1<s<2.

The way to figure that out is via the CDF.

.

Then draw the unit square of x and y between (0,1) for both

and find this area WITHOUT integrating, use geometry.