There are a variety of approaches. Here is one:

cdf = F(x) = 0 for x < 0.

for .

cdf = F(x) = 1 for x > 1.

Note that the pdf is found from dF/dx.

Your other question can be done in a similar way.

If you need more help please post all your working and say where yuo get stuck.