I think your error is that you expect that for OWF each and any `f(x)` computation should be hard to reverse. But it seems incorrect, f.e. [modular squaring][1] is easily reversible for `x=0`.

By using `g(x) = x - f(x)` you will have a pair of functions that are hard to revert, but their sum is identity function.


  [1]: https://en.wikipedia.org/wiki/One-way_function#The_Rabin_function_(modular_squaring)