Relative speed problems

Can we use LCM to solve such questions in quant?

Yes. Or just bruteforce.