This problem can be explained and solved using Charles's law of gas which states that: "Under constant pressure, the volume of a given mass of gas is directly proportional to its temperature in kelvin."
This law can be transformed into the following relation:
V1 / T1 = V2 / T2
where:
V1 is the initial volume = 0.5 m^3
T1 is the initial temperature = 20 + 273 = 293 degrees kelvin
V2 is the final volume that we need to calculate
T2 is the final temperature = 45 + 273 = 318 degrees kelvin
Substitute with the givens in the above relation to get the final volume as follows:
V1 / T1 = V2 / T2
0.5 / 293 = V2 / 318
V2 = (0.5/293) * 318
V2 = 0.54266 m^3