The diagram is as shown. The area under $f(x)$ for a given probability density function is $1$. I am thinking maybe I can use the equation of the second "half" of the triangle (the diagonal sloping downwards) to find the value of k, but I keep getting the wrong answer. The equation I got for the second "half" of the triangle is $y=-x+2$. This is the definite integral I tried:
$$\int_{1}^{k} (-x+2)dx=0.02$$

Is there an easier way to get the answer? The book's solution says $k=1.8$, but I don't understand how to get there. Any hints / tips would be appreciated!
If $k \le 2$ we have $$P(X > k) = \int_{k}^{\infty} f(x)dx = \int_{k}^2 f(x)dx$$ For $k \in [1,2]$ we have $$P(X > k) = \int_{k}^{\infty} f(x)dx = \int_{k}^2 (-x + 2) dx $$ You may find $k \ge 1$ such that $P(X > k) = \int_{k}^2 (-x + 2) dx = 0.02$ and it will give you answer.