So you're looking for a number between 40 and 50 whose remainder is 2 when divided by 3:If the marbles are taken out of the jar 3 at a time, 2 marbles will be left in the jar.

41, 44, 47, 50

Here, you're looking for a number between 40 and 50 whose remainder is 3 when divided by 4:If the marbles are taken out of the jar 5 at a time, 4 marbles will be left in the jar.

43, 47

47 appears in both lists, so that's the answer.

01