4. Find the largest even three-digit number $x$ that gives a remainder of 2 when divided by 5 and satisfies the condition $\operatorname{GCD}(30, \operatorname{GCD}(x, 15))=3$.
Solution. From the condition, we get that there exist such $a, b \in \mathbb{N}$ that $3a=30$, GCD $(x, 15)=3b$, and GCD $(a, b)=1$.

Consider the equality GCD $(x, 15)=3b$. This means that $\exists c, d \in \mathbb{N}$ such that $x=3bc$ and $15=3bd$, and GCD $(c, d)=1$.

From the equality $15=3bd$ it follows that $bd=5$, i.e., $\left[\begin{array}{l}b=1, d=5 \\ b=5, d=1\end{array}\right.$.

Let $b=1, d=5$. Then $x=3c$. Considering that $x$ is even, we get $x=6m$. From the condition GCD $(c, d)=1$ it follows that $c$ does not divide 5, which means that $6m$ does not divide 5, i.e., $x$ can be any of the following numbers: $30l+6, 30l+12, 30l+18, 30l+24$, where $l$ is any natural number. Considering that $x$ when divided by 5 gives a remainder of 2,
only $30l+12$ fits.

Let $b=5, d=1$. Then $x=15c$, i.e., $x=30t$, but then GCD $(x, 15)=$ 15 and GCD $(30$, GCD $(x, 15))=15-$ contradiction.

Therefore, the problem has been reduced to finding the largest three-digit number of the form $30l+12$. This is 972.