The trick is to understand the units digit of x. We know that multiples of 5 have either 5 or 0 as units digit. So depending on the units digit of x, the remainder w.r.t 5 can be determined.
a) x^2 leaves a remainder of 4. First, we need to ask, what could be the units digit of x^2?
Case 1: If the closest multiple of 5 near x^2 had units digit of 0, the units digit of x^2 would be 4. This would mean: x's units digit is either 2 or 8.
Case 2: If the closest multiple of 5 near x^2 had units digit of 0, the units digit of x^2 would be 9. This would mean x's units digit could be 3 or 7.
For each of these cases, when x is divided by 5, we get a different answer. So A is not sufficient.
b) x^3 leaves a remainder of 2. Following same logic:
Case 1: units digit of x^3 will be 2. Only such possibility if units digit of x is 8 (no other cube has 2 as units digit)
Case 2: units digit of x^3 will be 7. Only such possibility if units digit of x is 3.
Two different possibilities right? This is where the beauty of this question lies. Both numbers 8 and 3 when divided by 5, leave 3 as remainder! So it is unique!! Statement 2 is sufficient.
[spoiler](B)[/spoiler]