Read the situation: Jay measures the space between two bookcase sides at the front. When he slides a cardboard shelf pattern inside, the front fits but a strip of trim stops the back edge.
Your question: What should Jay check before cutting the wood?
Think first: The pattern shows where the fit changes.
Answer and explanation: Measure the usable space where the shelf will actually sit, including the trim. Adjust and retest the cardboard pattern before transferring it to the board.
Use it again: Use a cheap pattern to find obstacles a single measurement misses.