We can create two linear functions with the equations we're given
y = 265 + 7m
Whereas 'y' is the total amount of calories you burn, and 'm' is the minutes you swam
f = 273 + 11m
Whereas 'f' is the total amount of calories your friend burns and 'm' is the minutes your friend swam.
Since both of you swim for the same amount of time, 'm' is merely a constant, and so you don't need to keep it in your equation.
y = 265 + 7
f = 273 + 11
(As an example, 6/8 is written as 3/4 since the constant 2 is essentially negligible)
y = 272
f = 284
Now we have to find the difference.
284 - 272 = 12
The difference is 12 calories
If something didn't make sense, just ask. :)
Good luck!