The answer would be 8.
40 - 1, 2, 4, 5, 8, 10, 20
48 - 1, 2, 3, 4, 6, 8, 12, 16, 24
The greatest factor they both have is 8, which means that's the answer you're looking for. :)