I'll write an answer, but first: This is not a real GMAT question, beware. You also did not supply answer choices, so I'm conjecturing it's PS?
The game here is to find the prime numbers that satisfy the given constraints.
The main constraint supplied is that there are three numbers in a set, each defined by a given expression, and one of them (x-1) must be the median.
There are in fact two prime numbers that satisfy the constraint: 2 and 3. Just try plugging them in and you'll see. Only for the numbers 2 and 3, does (x-1) become the median term. For all other primes, (x-1) will be the smallest term with no repeating terms.
There are two solutions to this problem:
When you plug in 2, the arithmetic mean of the terms becomes 10/3
When you plug in 3, the arithmetic mean of the terms becomes 16/3