Option 1 -> Incorrect matching: "from hand to mouth" doesn't fit context A about police arriving.
Option 2 -> (A)-(III): "in the nick of time" = just in time; (B)-(I): "from hand to mouth" = living in poverty; (C)-(IV): "slow on the uptake" = slow to understand; (D)-(II): "smell a rat" = suspect something wrong.
Option 3 -> Incorrect matching: (C) and (D) are wrongly paired.
Option 4 -> Incorrect matching: All pairings are incorrect.
Hence, Option 2 -> The idioms correctly match: police arrived "in the nick of time" (just in time), people living "from hand to mouth" (in poverty), Rohit is "slow on the uptake" (slow to understand), and still "smell a rat" (sense suspicion) in Ajay's behavior -> correct