I don't see that approach working.

You could try doing it this way:

Can you show that f is continuous? If so, that's actually all you need, but you could then quickly prove much more:

-----------------------------

Maybe this is enough to guide you, maybe it isn't. But think about:

-----------------------------

You could also try doing it this way, which amounts to about the same thing while requiring more work: