"Last one back, sir" means "the last one (person) has come back, sir"
For security reasons perhaps, in some places/buildings/etc. there are two doors. The first door can be opened by anyone but the second one cannot be opened without a reason. In your example, the guard is reporting to his superior the reason for opening the second door.