Hi If the sentence had been he d worked for the XYZ company for two years lt lt lt lt Yes but then you have to start looking at the context to see whether the Past Perfect is suitable then we say with certainty that he is definitely not working for that company anymore becasue of the past perfect...