Is yeast that is two years old and has never been opened be used
If I were you, I'd do a simple test that determines, how active (= alive) your yeast is.
When you supply yeast with ideal living conditions, you can observe the activity - or lack of - as the yeast bubbles and foams.
For a test, you sprinkle yeast in lukewarm water and check for activity. A detailed description can be found here, for example.
This should give you the answer whether your yeast is still useable or not.