We have, $f'(x) = \mathop {\lim }\limits_{h \to 0} \frac{{f(x + h) - f(x)}}{h}$
$ = \mathop {\lim }\limits_{h \to 0} \frac{{2xh + f(h)}}{h}$
$ = 2x + \mathop {\lim }\limits_{h \to 0} \frac{{f(h)}}{h}$
Putting y=0 in the original equation yields f(0) = 0. So, the limit is of $\frac{0}{0}$ type.
$ = 2x + \mathop {\lim }\limits_{h \to 0} f'(h)$ [Using L.H. Rule]
$ = 2x + f'(0)$
Now, $f(x) = \int {2x + f'(0)dx} $
$f(x) = {x^2} + f'(0)x + C$
$\because f(0) = 0,C = 0$
$\therefore f(x) = {x^2} + f'(0)x = {x^2} + Bx$ where B is some constant.