Does somebody know if there's relationship between apex and derivative ?

If there's formula y=ax^2+bx+c then the x apex is -b/2a and y apex is y(x). But can I get the same result by using function's derivative ?

I tried to determine a and b according to the condition that parabola's y=a+bx-x^2 apex point would be (1;2)

I assumed that at the apex the slop is 0 and so did some substitutions:

firstly first derivative is: y'=0+b-2x

0=b(1)-2

b=2

y=2 so 2=a+2-1

2=a+1

a=1

It appears to be correct but the way I am used to use for finding apexes don't work with the formula y=a+bx-x^2

Any ideas ?