.
If you read the problem and think on it 1 minute, you should be able to guess / (to recognize) the answer mentally
Bob is 12 years; Fred is 6 years.
You also can solve the problem algebraically / (formally).
Let x be the Fred's age. Then Bob's age is 2x, according to the condition, and
2x - x = 6.
Hence, x = 6 (the Fred's age) and 2x = 12 (the Bob's age).