Okay so since we have all the variables, we can go ahead and make our formula. So our equation would look like z = (w/x) divided by y . This is because z would be the sum of the x miles divided by the cost of each mile (w). And then we would divide what we got in the parenthesis by y (friends).