You can 
put this solution on YOUR website! .
Forget about Ann in this problem.  She was introduced specially to confuse you.
Concentrate/focus on David and Ben only.
For them, you have these two equations
D + B = 40
D - B =  4
--------------------Add the equations
2D = 40 + 4 = 44  ====>  D =  = 22.
Answer.  David is 22.  Ben is 18.
 = 22.
Answer.  David is 22.  Ben is 18.
Solved.