The serial number would either be on the back of the CD case or within the documentation that came with your software when you purchased it. You will know it is the serial number because it is a mix...
To buy an older version of AE you'll have to look on second party websites and such like amazon. Otherwise you can buy the most recent/up to date software from adobe.com
Assuming that you're working with a pirated version or just simply lost yours, check back with the website if you're having issues. If you ARE in fact doing something illegal, key generators are...