In order to understand this equation you will need to go back to the definition of a probability measure in measure theory. The book you are working from is not a good introductory book for that purpose, so I recommend you start by reading an introductory text on probability and measure. In any case, I will give you an explanation of how this equation comes about.$^\dagger$ In this explanation I will refer to "measureable" sets, for purposes of rigor, but you can ignore that part until you know more about measure theory.
Explaining the equation: The symbol $P$ in this equation is referring to a probability measure on the abstract sample space $\Omega$. We call the elements $\omega \in \Omega$ "outcomes" in the sample space and we refer to (measureable) sets of these outcomes as "events". The probability measure takes an event and tells us its probability.
Now, in most applications of probability theory, we want to work with random numbers, and to do this, we label each of the outcomes in the sample space by a number. In the present case, $X(\omega)$ is the number ascribed to the outcome $\omega$ in the sample abstract space. Suppose you want to find the probability that the number $X$ falls within some particular set of numbers. To do this, we define a new probability operator $P_X$ which takes in a set of numbers instead of a set of outcomes in the abstract sample space. This is really a definition of the new probability measure:
$$P_X(\mathcal{S}) \equiv P(X \in \mathcal{S})
\quad \quad \quad \text{for all measureable } \mathcal{S}.$$
Since $X: \Omega \rightarrow \mathbb{R}$ is a function mapping the outcomes in the abstract sample space to the real numbers, the pre-image $X^{-1}$ for this function is:
$$X^{-1}(\mathcal{S}) \equiv \{ \omega \in \Omega | X(\omega) \in \mathcal{S} \}.$$
Using standard properties of the pre-image, we have the event equivalence:
$$X(\omega) \in \mathcal{S}
\quad \quad \iff \quad \quad
\omega \in X^{-1}(\mathcal{S}).$$
Putting all these things together means that for any measureable set $\mathcal{S}$ we have:
$$P_X(\mathcal{S})
= P(X \in \mathcal{S})
= P(X^{-1}(\mathcal{S}))
= P(\{ \omega \in \Omega | X(\omega) \in \mathcal{S} \}).$$
This final equation essentially just says that the probability that $X$ is in the set $\mathcal{S}$ (using the probability measure $P_X$) is the same as the probability that we have an $\omega$ with $X(\omega) \in \mathcal{S}$ (using the probability measure $P$). The purpose of the equation is to show how the measure $P_X$ relates back to the foundational probability measure $P$.
$^\dagger$ I don't really like the kind of notation used in the book, so I'm going to use some slightly different symbols/fonts for this equation; it is the same thing in slightly different notation.