To solve two sets of equations at the same time