Official solution
f(1) = 2
f(2) = 2
f(3) = 4
f(4) = 4
f(5) = 6
f(6) = 6
f(7) = 8
f(8) = 8
f(9) = 10
f(10) = 10
\[ \therefore \] f(1) = f(2) = 2
f(3) = f(4) = 4
f(5) = f(6) = 6
f(7) = f(8) = 8
f(9) = f(10) = 10
Given, g(f(x)) = f(x)
when x = 1, g(f(1)) = f(1) \[ \Rightarrow \] g(2) = 2
when, x = 2, g(f(2)) = f(2) \[ \Rightarrow \] g(2) = 2
\[ \therefore \] x = 1, 2, g(2) = 2
Similarly, at x = 3, 4, g(4) = 4
at x = 5, 6, g(6) = 6
at x = 7, 8, g(8) = 8
at x = 9, 10, g(10) = 10
Here, you can see for even terms mapping is fixed. But far odd terms 1, 3, 5, 7, 9 we can map to any one of the 10 elements.
\[ \therefore \] For 1, number of functions = 10
For 3, number of functions = 10
\[\eqalign{
\& . \cr
\& . \cr
\& . \cr
\& \cr} \]
for 9, number of functions = 10
\[ \therefore \] Total number of functions = 10 \[\times\] 10 \[\times\] 10 \[\times\] 10 \[\times\] 10 = 105