Using a 300° cam to make the numbers easy:
#2 cylinder's intake cam lobe will open its exhaust valve @ 40° BTDC, descend for 180°, and close it @ 80° ABDC (40 + 180 + 80 = 300). The vacuum from the falling piston will fill the cylinder with exhaust gas from previous cycles and compress it.
#2 exhaust cam will open its intake valve @ 80° BBDC, rise for 180°, and close it @ 40° ATDC (80 + 180 + 40 = 300); there is no exhaust for the rising piston to expel, but it will pressurize the intake manifold.