Find four equations that relate the variables from the problem statement. If someone spent 25 dollars and bought four items, each cost could be a variable. Next is setting other relationships in order to achieve four equations. The first would be x1 + x2 + x3 + x4 = 25.
Group each relationship or equation so that the variables are lined up in order of subscripts. If a variable is not used in an equation, add zero for the variable to keep the equations lined up. If apples, oranges, lettuce and pineapples were bought and three pineapples are as much as six apples, a relationship written properly is 6x1 + 0x2 + 0x3 - 3x4 = 0, and the first relationship was x1 + x2 + x3 + x4 = 25.
Check for uniqueness of relationships by assuring that no two of the four relationships are saying the same thing. Check by trying to rearrange the equations into the same form as another. This check is critical to do the proper multivariable algebra.
Multiply any equation to match a single coefficient variable and subtract the two equations. This will give a new equation with one less variable and also should be done with respect toward solving for a single variable. If six apples and six oranges were as much as six pineapples, it could be changed to find that three oranges equal a pineapple, three apples equal a pineapple and the x1 is equal to x2.
Relate all variables to a single variable and solve for that variable. Lettuce, x3, is 1/2 the price of apples. And the relationship is 1/2x1 + 0x2 - 1x3 + 0x4 = 0. The solution is not given but should become apparent if the set up lined up.