Just try it. Make a full backup of your system, as it is now, Buy GarageBand 10.0 for free, but do not uninstall GarageBand '09. The GarageBand 10.0 installer will usually move the older GarageBand '11 to a subfolder of Applications, but I do not know, if this will happen with GarageBand '09 as well.
Then launch GarageBand 10.0 and check, if the "Restore Purchase" option is available in the GarageBand menu.
See this document:
GarageBand X has become a free application. So "buying" it is not really an issue.
However you can buy additional content from within GarageBand X, which contains of pretty much all the JamPacks Apple sold for a combined $500 for many years plus more drummers, etc for $4.99. (thats 5 dollars, not fivehundred dollars)
My macbook air had garageband installed when i bought it, now it wont let me buy the up-grade because i use a differant apple ID. dont know any other Id.
You can only update an app, if you sign into the App Store with the same APpleID that was used, when the app has been bought. An application is bound to an Apple ID and cannot be transferred to a different one. If you used a different AppleID when you first set up your MAc or somebody else did it for you, try to find out the AppleID that has been used. If you bought the Mac second hand, then delete the applications, that are tied to the AppleID of the previous owner and buy them using your AppleID. The previous owner is not allowed to transfer them.
Added: The error message might be misleading; see this Support document: Perhaps you have not yet accepted GarageBAnd 10.0 to your Apple ID: