x = daughter's age
so:
5x = 6 + 3x
5x - 3x = 6
2x = 6
x = 6/2
x = 3
now just do the equations to find her age
mother before 6 years: 5 x 3
mother after 6 years: 3 x (3+6)
Hopefully, this helps! If it doesn't tell me in the comments so I can explain it better!