Permutation checking and Inclusion-Exclusion

Firstly i was wondering whether someone could check if ive done this right...

Suppose f is the permutation (1, 2, 3, 4)(5, 6, 7)(8, 9)(10) of the set X = {1, 2, . . . , 10} and let g be the permutation (1, 4)(2, 7)(3, 10)(5, 9)(6, 8)

of X. Calculate f o g and g o f.

I got f o g = (1)(2 3 4 5 7 8 10)(6 9)

and g o f = (1 2 3 6 7 9 10)(4)(5 8)

Now the question i have no idea about...

Let S be the set of 3-digit decimal integers {000, 001, 002, . . . , 999}. Use Inclusion-Exclusion to find how many such integers contain at least one 7. (Hint. Let S1 be the subset of S consisting of elements with first digit equal to 7, etc.)

I have no idea how to use the inclusion-exclusion principle so can anyone help with that please?

cheers