I think you need to go back to the definition of the derivative (as a limit of the difference quotient). For the first equation, start with:
The left-hand side and the second fraction on the right-hand side are good. There's a problem with the first fraction on the right-hand side, though, since could be equal to for any or even all x in an interval around . The trick is to define a function Q(y) which is equal to when and when . So you have:
because when , the terms cancel, and when , both sides are zero. Now you can take the limit as x goes to .