Both 3 and 24 have 3 in common. This means that you can factor a three out of this equation like so:
3(x + 8y)
If you distribute the three back into the equation then you would then get 3x + 24y (the equation before factoring)
Hope this helped!
~Just a girl in love with Shawn Mendes