I don't know if f(x) is differentiable, but I can only do it with the definition of derivative:
lim(x→0)f(ax)/x = alim(x→0)[f(ax)-f(0)]/ax = af '(0)= 1/2;
So f' (0) =1/2a;
Similarly,
lim(x→0)f(bx)/x = blim(x→0)[f(bx)-f(0)]/bx = BF '(0)= b * 1/2a = b/2a