Tarkin was the Commanding Officer of the Death Star. He had the final say of anything that involoved the Death Star, unless the Emperor gave an order. So when Vader was on the Death Star he was out-ranked by Tarkin. However, when Darth Vader was not on the Death Star he answered only to the Emperor, and no one else.