Yep that's correct
Basically what you do after that is you write them grouped together like:
(ax^2 +bx^2 + cx^2) + (4ax+ 6bx+ 8cx)+ (4a+ 9b+ 16c) =2x^2 + 8x+ 6
So the x^2 are together, the x are together and the constants are together
From there you just equate the coefficients pretty much...