To learn why this was started as shown and how to continue, see this lesson and study thoroughly: Completing the Square to Solve General Quadratic Equation
You would know what form to finally put the equation into based on what you know of the standard forms for conic sections.