Let , and be the results of transformations after the step A, B and C, respectively. Thus, . Then , and , not .
One way to find f(x) is assume that it has the form . Then . By equating the corresponding coefficients, you can find A, B, and C.
Another, perhaps, more reliable, way is to apply the inverse transformations to .