Explanation :
The total of the mother's age and the daughter's age is 50.
5 years ago, the mother was 7 times the age of the daughter.
Therefore,
If the total of their ages is 50 now, then 5 years ago the total of their ages was 40 (50 years minus 5 years off the mother's age and 5 years off the daughters age, or 50 (5+5)).
That last point is what will help us solve this problem. Let's state the last point as an equation. For the purposes of crafting some nice tidy equations,
M=Mother's age 5 years ago
D=Daughter' age 5 years ago
The first equation is pretty simple:
M+D=40
We also have to write the part about the mother being 7 times older than the daughter into an equation:
M=7D
Now that we have two equations, we can use them together to solve the question about how old the mother and daughter were 5 years ago.
First, we can get rid of M to make the equation easier to solve.
Since M=7D, substitute the M in the first equation with 7D in the second equation:
M+D=40 > 7D+D=40
Now solve for D.
7D+D=40
8D=40
8D/8=40/8
D=5
So 5 years ago, the daughter was 5 years old.
Now extrapolate:
5 years ago the daughter was 5, so now she's 10.
5 years ago, the mother was 7 times the age of her daughter (7D=M, or 7(5)=M),
So, 5 years ago the mother was 35, and now she's 40 (7D+5=Mother's current age, or 7(5)+5=Mother's current age)
And if you need more proof,
40+10=50