how to solve a system of three linear equations with substitution