For a type I error, you calculate the probability of a rejection under the assumption that the null hypothesis is true. So you find the density of $X$, call it $f_X$, under the assumption that $\theta=2$. Then the probability of a rejection is
$$\int_0^{0.1} f_X(x) dx + \int_{1.9}^2 f_X(x) dx.$$
For a type II error, you calculate the probability of an acceptance under the assumption that the null hypothesis is false. In real problems you generally can't compute this, because usually knowing that the null hypothesis is false doesn't specify the distribution uniquely. But in your case they tell you what the actual value of $\theta$ is for this part of the problem, which lets you compute it. Specifically, the probability of an acceptance is
$$\int_{0.1}^{1.9} f_X(x) dx$$
where $f_X$ is the density of $X$ under the assumption $\theta=2.5$.