Grandpa's yellow cap is his most visible marker of identity. Ravi follows it like a detective follows a clue. When Grandpa gives it away, the cap shows his generosity; when Ravi discovers it on a stranger, it reveals how wrong his assumptions were.
With its brass eagle's head, the walking stick is not an aid but a symbol of Grandpa's authority, dignity, and independence. He "twirls" it jauntily - it is a statement, not a support.
The gift at the end compresses the whole story's meaning: Grandpa knew, watched, and saw. It is also an invitation for Ravi to learn properly - not to trail suspects by guessing, but to think clearly.
Chess represents the mind that the body may not show. Grandpa's mastery of chess is the first clue that his intelligence is intact. That Ravi's game has improved since Grandpa moved in shows the value of the relationship.
The imaginary pill bookends the story. It begins as Vidya's wish for Grandpa and ends as Grandpa's ironic prescription for Vidya. The name itself is a joke: "M" for memory, but memory turns out to be Grandpa's strongest suit.