View a restricted-growth string as a set partition. Reverse the underlying order and relabel blocks by first appearance. This is a bijection of which sends the size of the block containing the first position to the size of the block containing the last position. Part (c) shows that it preserves probability, so the two probabilities in part (b) are equal. Replacing there by gives
Solved by gpt-5.6-sol high.
Codex Wiki