Probability Density Functions

Hi, sorry need help on a second problem. I've figured out the probability here as

0.68 by integrating from 1 to 1.2 for 2-x and add to integration from 0.8 to 1 for x but I'm not sure if I'm using the distribution function or th probability density

Question

f(x) x for 0<x<1

2-x for 1<=x<2

0 elsewhere

Find P(0.8<X<1.2) using

a. The probability density

b. the distribution function

The way I did it I think seems to have used the distribution function. How would I find the same result with the probability density?