Solving a system of linear equation in two variables