I don't know if I could show any working, I really just worked it out by common sense and logic. Put it this way; it can't be 3 because the lowest common multiple of 2, 3 and 21 is 42, not 126. Maybe the easiest way to try and explain it is to divide the LCM by 2, which gives you 63. Since 2 doesn't go into 63, the next multiple of 63 which is divisible by both 2 and 21 is 126, so x = 63.
You could divide 126 by 3, which gives 42, but the LCM of 2, 21 and 42 is 42. Similarly you could keep dividing 126 by integers until you reach another number which isn't divisible by both 2 and 21, and that would be your x, but the only number which satisfies the criteria I gave in the previous post is 63 (well, so does 126 itself, but you are asked to find the smallest possible number for x).
I hope this makes it a little clearer. I'll hunt around for a formula or I might just have to make one up.
Here's a way to check that the number you've found is correct.
where is the greatest common divisor of and . Here, choose one of your given factors (2 or 21), and the factor you'd like to check (in this case, 63). It's best to test with both given factors, as we'll see.
So we get:
However if you used 21 instead of 2, you would get:
So you see why it's important to test both factors.
This formula is originally designed to find the LCM, not to work the other way around, but it does provide a good way to test your answer.
Hope this helps.