Additional District and Sessions Court judge S P Pandey also fined the convicts Rs 10,000 each.
The court acquitted one person for lack of evidence while another is absconding.
Another accused is facing trial in a juvenile court.
Three persons, including the owner of the petrol pump, were shot dead when they resisted a robbery in January 27, 2011 at Nehra village under Manigachi police station area.