Suppose X is exponentially distributed with $\lambda=2$.
I want to compute $P(X\le 2 \textrm{ or } 3<X<8)$.
The probability density function of $x$ is $f(x)=2e^{-2x}$.
Then I will find its distribution function as $F(x)=1-e^{-2x}$.
I don’t know exactly, but I think that $P(X\le 2 \textrm{ or } 3<X<8)$ can be calculated as follows:
$$P(X\le 2 \textrm{ or } 3<X<8) = P(X\le 2)+ P(3<X<8)-P(X\le 2, 3<X<8)$$
$$P(X\le 2)=F(2)= 1-e^{-4}$$
$$P(3<X<8)=F(8)-F(3)= e^{-16}-e^{-6}$$
But what is $P(X\le 2, 3<X<8)$?
Or what is the correct way to solve this question?
You're almost there. Note that the events $\{X \le 2\}$ and $\{3 < X < 8 \}$ are mutually exclusive.
$$P(X \le 2 \text{ or } 3 < X < 8) \\ = P(\{X \le 2\} \cup \{3 < X < 8\}) \\ = P(X \le 2) + P(3 < X < 8) \\= (1 - e^{-4}) + (e^{-6} - e^{-16}) \\ = 1 - e^{-4} + e^{-6} - e^{-16}$$
Note that you've inverted the sign when calculating $P(3 < X < 8)$.