David has x amount
Casey has (x-7) amount.
Together they have $97.
Therefore: x + (x+7) = 97
2x - 7 = 97 ....... The main goal is to get x by itself.
So, add 7 to both sides
2x = 104
Divide both sides by 2. Therefore, x = 52.
Since x is the amount of money David has, David has $52. Since Casey has $7 less than David, $52 - $7 = $45
Double check: $52 + $45 = ? Do these numbers add to $97? Yes, they do, therefore, your answer is correct.