.
So, we have two integer numbers, "a" and "b", on one hand side, and
we have two other integer p and q, on the other hand side, such that
p = -(a+b) and q = ab.
(1) First question is: is it true that IF p and q are coprime, THEN "a" and "b" are coprime ?
Let's prove it by CONTRADICTION.
Let assume that "a" and "b" are not coprime.
It means that there is such a prime number w such that "a" and "b" are multiple of w.
Then it is OBVIOUS that w is the common divisor for (a+b) and ab.
Hence, w is the common divisor for p and q.
It proves, by CONTRADICTION, that if p and q are coprime, then "a" and "b" are coprime, too.
So, the first statement is proved.
(2) Second statement is: IF p and q are not coprime, THEN "a" and "b" are not coprime, too.
Here the DIRECT proof works.
If p and q are not coprime, then (a+b) and (ab) are not coprime.
It means that (a+b) and (ab) have common prime divisor w.
Since w divides the product (ab), it divides at least one of the numbers "a" or "b".
If it eventually divides both "a" and "b", then there is NOTHING to prove . . .
So, let assume that w divides "a".
Then w divides "a" and (a+b), at the same time.
It just implies that w divides b, too (which is OBVIOUS).
So, we proved that if p and q are not coprime, then "a" and "b" are not coprime, too.
The second statement is proved.
The problem is just solved: both statements are proved.
/\/\/\/\/\/\/\/
The post-solution note: do not call the numbers "a" and "b" as factors - in given context, they are not.