There is no unknown algorithm: the age difference between father and daughter is 40- 12=28, and the age difference remains unchanged! This difference is equal to 5- 1=4 times the age of the daughter in that year (so the age of the daughter in that year is 28÷4=7 years old), and the sum of the ages of the father and daughter in that year is 5+ 1=6 times the age of the daughter, so the sum of the ages of the father and daughter in that year can be obtained according to the multiple relationship. The comprehensive formula is (40-12) ÷ (5-1) × (5+1) = 28 ÷ 4× 6 = 42 years old.
The sum is 42, and the calculation process is:
Suppose my father is five times older than Xiaoming for x years, and the equation (40+X)/( 12+X)=5 is obtained, and X=-5 is obtained. That is to say, five years ago, my father was five times that of Xiao Ming. At that time, Xiao Ming was 7 years old and his father was 35 years old. Their total was 42.