The problem can be solved by the following system of equations: and where j represents the amount of money that John spent, and k represents the amount of money that Kelly spent.