If you cannot obtain the W-2 from your employer, then for a fee you can get a complete copy of a W-2 from the Social Security Administration - https://faq.ssa.gov/en-us/Topic/article/KA-02501
You can get a free Wage and Income transcript from the IRS - https://www.irs.gov/individuals/get-transcript
It depends. The best place would be to see if you could get copies from your employers for those tax years. You can order transcripts from the IRS and they have the last nine years:
The IRS doesn't typically keep state data, so if you need it, you will have to contact your state.