The unknown quantity here is the number of years until the father is three times as old as the daughter. We call that x. So in x years, the daughter will be x + 5 years old, and the father will be x + 31 years old. Our equation then is:
x + 31 = 3(x + 5)
This algebraically states when the father will be three times as old as the daughter.
Can you solve this for x?