This problem boils down to solving a system of equations, but it is a little tricky to develop the correct equations.
Let x = amount of $ that Evan has
Let y = amount of $ that Katie has
Let z = amount of $ that McKenna has
The first equation we can develop is straight forward and described in the first sentence.
x + y + z = $865
The tricky part of this problem is realizing the difference between the amount of money each person has, and the amount of money each person has spent.
Let xs = amount of $ that Evan has spent
Let ys = amount of $ that Katie has spent
Let zs = amount of $ that McKenna has spent
xs = 2/5*x (Evan spent 2/5 of his money)
ys = $40 (Katie spent $40)
zs = 2*xs = 2*(2/5*x) = 4/5*x (McKenna spent twice as much as Evan)
Now we also know they each have the same amount of money left. How can we use an equation to describe the amount of money remaining? (Money each person has) - (money each person spent).
(x-xs) = (y-ys) = (z-zs)
Setting the first two equal:
(x- 2/5*x) = (y-$40)
3/5*x = y-$40
y = 3/5*x + $40 (this is our second equation)
Setting the first and third equal:
(x-2/5*x) = (z-4/5*x)
3/5*x = z-4/5*x
z = 7/5*x (this is our third and final equation)
Next we substitute "y" and "z" into our original equation and we can solve for "x".
x + (3/5*x + $40) + (7/5*x) = $865
This leads to:
x = $275 (Evan)
y = $205 (Katie)
z = $385 (McKenna)