City University student Cheng Kam-fai, 22, and construction worker Wong Kin-kei, 21, were earlier found guilty of possessing items with intent to destroy or damage property.
The pair, who had dozens of petrol bombs between them, were among five people arrested in Wan Chai in 2019.
Two other defendants in the case who earlier pleaded guilty were sentenced to 38 months in prison, while another defendant was acquitted.
Judge Eddie Yip described the case as serious, noting that the petrol bombs were stored in a unit in a multi-storey commercial building. He said deterrent sentences were therefore needed.