Hi there! So in math I am having trouble for factorization. I do get help from my teacher but I’m still confused?

Terrence is taking two medications for his flu. He begins taking them both at 10:00 PM on Tuesday. If he takes one every eight hours and the other every 10 hours, On what day and what time will he take the two medications together again?

Use 24 hour clock to make it easier

10 pm is 22 hundred in Navy 24 hour time 22:00

time for pill 1 = 22 + 8 n
time for pill 2 = 22 + 10 m
so when are they the same with integer n and m?
22 + 8 n = 22 + 10 m
8 n = 10 m
greatest common factor = 2
2 *4 n = 2 * 5 m
4 n = 5 m
so for smallest integer n and m
n = 5, m = 4
5 * 8 = 40 hours
4 *10 = 40 hours
so
40 hours after 22 hundred on tuesday
40 = 24 + 16
start time was 22 on tuesday
24 hours makes it 22 hundred on Wednesday and we go 16 hours more
that is the two hours to midnight wed and = 14 hours on Thursday
14:00 hours is 2 pm Thursday