Explanation:
Think of it as a ratio problem.
Tom gets his haircut every 4 weeks and David gets his haircut every 6 weeks. So you can write it as 4:6.
The easiest way that I know of to do this is to find multiples.
4: 4x2=8 4x3=12
6: 6x2=12
So the twelfth week they will get their haircuts the same day.