Solve system of linear equations by substitution method