The phrase bought them both matters: the buyer entered one combined transaction without inspecting both goods.
The rule protects a buyer from having to retain the whole combined transaction despite the inspection right arising on one item.
If two objects were bought under genuinely separate contracts, that is not automatically the same legal case.