You can use Fermat Little Theor .
Assuming yours xis relatively simple with 10, the following holds true:
10 ^ φ(9x) ≡ 1 (mod 9x)
Here φ is the Euler totalizer function . Thus, you can easily calculate at least one n(not necessarily the smallest) for which your equation is satisfied. To find the smallest one n, just go to the list of dividers n.
Example: x = 89 (a prime is just for simplicity).
9x = 801
φ(9x) = 6 * (89 - 1) = 528 (easy to calculate for a prime number)
List of 528 dividers:
1
2
3
4
6
8
11
12
16
22
24
33
44
48
66
88
132
176
264
528
, , 44:
10 ^ 44 ≡ 1 (mod 801)