Solving System of Linear and Quadratic Equations