Let's say I have no idea how to set this problem up. Instead of going straight to an equation, I'll need to put in some real numbers, see what I do when I know what the values are, and then follow the pattern to get my formula. Here is my reasoning, neatly laid out in a table: