Code to find the solution for a system of equations (Linear and non-linear equations)