I want to determinate $p$ and $q$ in RSA.
I know that $n = 172451$ and $\phi(n) = 171600$.
$$171600 = pq - (p+q) + 1 = 172451 -(p + q) + 1$$ $$p + q = 172451-171600+1 = 852$$ $$(p-q)^2 = (p+q)^2-4pq = (852)^2 - 4(172451) = 36100$$
Now I'm stuck at this point and don't understand how can I get $p$ and $q$.
Anyone cares to explain.
P.S. - I've already looked at some other answers posted here on math.stackexchange.com but didn't unsertand
You are almost finished. We have $(p-q)^2=36100$. Without loss of generality we may assume that $p\ge q$. So $p-q=190$ (we took the square root).
We now know $p+q$ and $p-q$. By adding, we find $2p$ and hence $p$.