In order for a number to be divisible by 6, it needs to be divisible by both 3 and 2.
The divisiblity rule for 2 is if the end digit is an even number.
The divisiblity rule for 3 is if all the digits added up together can be divided by 3.
Even numbers are easy to spot, so let's focus on divisibility by 3.
5+2+2+8+X = 3n
17+X=3n
Now, we can use trial and error.
Case 1: n=6
17+X=18
X=1, which is not an even number, so discard this solution.
Case 1: n=7
17+X=21
X=4, which is an even number, so this is a valid solution.
At this point, we don't have to test for n=8 because the question states that there is only one digit for X.
So the answer is X=4.