If $\text{gcd}(s,t)=(y,s)=1$, then $\exists x$ such that $\text{gcd}(x,st)=1$ and $x\equiv y\pmod s$. [duplicate]

Solution 1:

As $\gcd(s,t)=1$, we have some integer $r$ such that $sr \equiv 1 \mod t$. Then set $$x=y-sr(y-1)$$

Then $x\equiv y \mod s$ and $x\equiv 1 \mod t$. In particular $\gcd(x,t)=1$. Also $\gcd (x,s)=1$ as any common factor of $x$ and $s$ is a common factor of $y$ and $s$.

Combining $\gcd(x,t)=1$ and $\gcd(x,s)=1$, we get $\gcd(x,st)=1$.