The question then is whether it is possible to get f(x1)= f(x2) for two different values of x1, x2 in [0, 1]. If both are rational, then that says x1= x2 so that case cannot happen. If both are irrational, then 1-x1= 1-x2 which also leads to x1= x2. If x1 is rational and x2 irrational, then x1= 1- x2 or if x1 is irrational and x2 rational, 1-x1= x2.
Do you see that in both cases one of f(x1), f(x2) is rational and the other irrational?