In (x+1)^42, 42^2 multiplications take place.
The relevant multiplications in this case are those that are x * x * 1^40 (= x * x * 1 = x^2)
So in each of the relevant multiplication, 2 x terms are multiplied and 40 "1" terms are multiplied.
This can be modeled onto a combinations problem of how many different ways there are to take 2 objects (x terms) from a group of 42 unqiue objects.
I don't know how to solve this, but I do know how to model it, so hopefully someone can take over from here.