As per the title, the task is to
Factor the RSA modulus $n = 3844384501$ knowing that $$3117761185^2 \equiv 1 \pmod{n}\text{.}$$
$n$ being an "RSA modulus" means that it is a product of two primes, i.e. $n = pq$. The task is to find these two primes.
I can see that from what we're given, $$ (3117761185 - 1)(3117761185 + 1) \equiv 0 \pmod{n}\text{,} $$ but I do not know how to proceed from there on. Any hints would be greatly appreciated.
N.B. It would seem that computing $\gcd(3117761184, n)$ and $\gcd(3117761186, n)$ would give me $p$ and $q$ but I have no idea why that would be justified.