Solve the following pairs of linear equations by the elimination method and the substitution method: