The question is comparing the ages of Lucy and her daughter. Lucy or her daughter need to be represented by a single variable. Since the problem states that Lucy is 2 years older than 3 times her daughter, then daughter = daughter. We can represent daughter with the single variable d.
If the daughter is d, then Lucy is L and therefore L is 2 years older than 3 times d, or the equation, L=3d+2.
The sum of their ages is 46, so, d+ L = 46. We know that L = 3d+2 so substitute 3d+2 for L in the equation d+L =46. you now have to add the sum of their equations that equal 46.
d + 3d+2 = 46, solve for d.