This is only for interest, and won't be much help on the GMAT:
There is no formula for generating prime numbers, which should make you a bit suspicious that the information in the above question is insufficient. Some formulas appear to always generate primes for small values of x, as when you plug even values of x into the above problem, but no formula generates primes for all x. Fermat (incorrectly) thought the following:
2^(2^x) + 1
would generate primes for all x, and if you plug in x = 1, 2, 3 and 4 you do get a prime each time (5, 17, 257 and 65,537 are all prime). These numbers are called Fermat primes. However, for x = 5, you do not get a prime (you do get a very large number, in the billions, so don't try to prove it isn't a prime!). In fact, to date, the only values of x for which the above formula is known to generate primes are exactly the values above: 1, 2, 3 and 4. This illustrates that it is sometimes dangerous to guess that a pattern will continue only because it holds true for a small number of values.
For online GMAT math tutoring, or to buy my higher-level Quant books and problem sets, contact me at ianstewartgmat at gmail.com
ianstewartgmat.com