in math it's often the case that you notice the solution first and only afterwards prove to yourself that it works. pattern matching and intuition play a large role in math!

this is why I'm not a big fan of "show your work": the "work" is however many years it took to build up my intuition, and often any explanation I could type out for my solution would be a retroactive rationalization. it's still useful, sure -especially for catching your errors, but I place it on the opposite end of the open-fake scale than most people.

of course here the proof is simple: 20 right moves, 20 down moves, any order => of 40 total moves choose any 20 indices to be your down moves => 40 choose 20 is your answer. would that teach you how to solve the next problem though? I'm not so sure.