if you split the 97 into equal halves, you pay them both back 48.50 of the original 97. by keeping the 3, you have to give them each an additional 1.50 to pay them back in full. so by paying them both back 49 you are taking that 3.00, taking 1.00 of it, giving each parent .50 of it, leaving you with 2.00 to split and give each of your parents 1.00 to pay them back in full.
so as a recap:
shoes cost 97 + 3.00 in change.
97/2 = 48.5 and you still have the 3.00 in change
(48.5+0.50) * 2 = (49) * 2 = 98.00 and 2.00 in change
(49 + 1) * 2 = (50) * 2 = 100 and no change remaining
by the logic you were using:
each parent starts with 1.00 therefore you have to pay them 49.00, however, when you take that approach, you are simply subtracting from the total you owe, which does not account for the 3.00 you kept. This means, by keeping that 3 dollars, you currently have an extra 3.00, but you still owe a total of 100 to be split between your parents, and when you give each of them 1.00, the total becomes 2.00 less than what you owe in total.
So, by keeping the 3.00 you owe your parents 97 + 3 = (48.50 * 2) + (1.50 * 2), by giving them each a dollar its 99 + 1 = (49.50 * 2) + (0.50 * 2).