We work here with Boyle's law which states that the volume of a gas, at constant temperature and number of moles, varies inversely with the pressure exerted on it.
We use this equation:
P1 x V1 = P2 x V2
1 and 2 are different gas conditions.
P1 = 10 atm
V1 = 8 L
V2 = 4 L
P2 = unknown
So, P1 x V1/ V2 = P2
10 atm x 8 L/4 L = 20 atm = P2
Answer: P2 = 20 atm