Converting from general to vertex form by completing the square