Let $p$ be the probability function associated with $\Omega$ (part of the probability space). The problem tell us that,
$$p(\{\omega\}) =\begin{cases}\frac{1}{6} & \text{for } \omega \in \{1,2,3,4,5,6\} \\0, & \text{otherwise}\end{cases}$$
Random variable $X: \Omega \rightarrow \mathbb{R}$ is defined as,
$$X(\omega) = \begin{cases} 1, &\omega \le 2\\ 2, &otherwise\end{cases}$$
We can rewrite this more clearly to enumerate all the values $\omega$ can take on:
$$X(\omega) = \begin{cases} 1, &\omega \in \{1,2\} \\ 2, &\omega \in \{3,4,5,6\}\end{cases}$$
Computing induced probabilities, we have
$$P(X = 1) = p(X^{-1}(1)) = p( \{1,2\} ) = \text{ (countable additivity) } p( \{1\} ) + p( \{2\} ) = \frac{1}{6} + \frac{1}{6} = \frac{1}{3}$$
Since $X$ has support $\{1,2\}$ we know that the events $X=1$ and $X=2$ are complements. Using the complement rule,
$$P(X=2) = 1 - P(X=2) = \frac{2}{3}$$
or
$$P(X = 2) = p(X^{-1}(2)) = p( \{3,4,5,6\} ) = \text{ (countable additivity) } p( \{3\} ) + p(\{4\}) + p(\{ 5\}) + p(\{ 6\})= 4 * \frac{1}{6} = \frac{2}{3}$$
The PMF of X is
$$P(X=x) = \begin{cases} \frac{1}{3}, &x = 1\\ \frac{2}{3}, &x =2 \\ 0, &otherwise\end{cases}$$