P(X=2) means that you draw the same number during the first two drawings.
So the first draw will give a number a, the second draw will give the second number a.
Whatever the first number is, the second has to be the same... so among the 7 remaining tickets, you have to pick a specific ticket.
So the probability will be 1/7
But maybe they want you to have a different reasoning... Like thinking with combinations or arrangements.