A man is 3 times as old as his daughter. Their total age is 40 years. What are their ages?

Let's assume that the daughter's age is x. According to the information provided, the man's age would be 3x, as he is 3 times as old as his daughter.

Their total age is given as 40 years, so we can write the equation:
x + 3x = 40

Combining like terms, we get:
4x = 40

Dividing both sides of the equation by 4, we find:
x = 10

Therefore, the daughter is 10 years old, and the man is 3 * 10 = <<3*10=30>>30 years old.