In all questions on Modulus/Absolute values, always remember that the output of the modulus function is always positive; the input can be either positive or negative.
When the question statement says that |x| is between 20 and 51, it means the output/the value of the modulus is between 20 and 51.
This means we can substitute any value between 20 and 51 OR any value between -20 and -51 as the input and still obtain a value between 20 and 51 as the output.
We are required to find out if |x| will give us a prime number. This depends on the value that we provide as the input, which is what we will have to figure out from the statements.
From statement I, we know that the sum of x and a prime number is 0. This means that the magnitudes of x and the prime number are the same, but x is negative (remember, the prime number cannot be negative since primes are defined for positive integers only).
For example, if the prime number is 23, then x = -23.
Clearly, the data given in statement I constrains us from using any value except the negative counterparts of the prime numbers between 20 and 51. By this we mean,
x = { -23, -29, -31, -37, -41, -43, -47}.
For any of these values of x, |x| is a prime number. We get a definite YES as an answer to the main question.
Statement I alone is sufficient. Possible answer options are A or D. Answer options B, C and E can be eliminated.
From statement II, we know,
x + 51 = 20, which gives us x = -31. For this value of x, |x| is definitely a prime number. Statement II alone is sufficient to answer the question with a definite YES.
The correct answer option is D.
In any question related to absolute values on the GMAT, focus on finding the inputs that will satisfy the expression. Knowing that a modulus always give a positive value will take you nowhere, finding out the inputs will.
Hope this helps!