Having some trouble simplifying this question given the below equations. Verify that using these formulas p*q = n
n − φ(n) + 1 = n − (p − 1)(q − 1) + 1 = n − pq + p + q − 1 + 1 = p + q
assuming p>q, then p − q = √(p − q)2 = √p2 + q2 + 2pq − 4pq = √(p + q)2 − 4n.
Then p = ½ [(p+q) + (p-q)] and q = ½ [(p+q) - (p-q)]