Two men are working together to empty the barrel of its contents.
Two men are emptying a barrel.
"Empty the barrel" is a rephrase of "emptying a barrel."
Two men working together are a type of two men, and emptying a barrel is a paraphrase of to empty the barrel.
Two men are working together to empty the barrel so they are  emptying a barrel.