OK , If you still had the trial installed all you would have had to do is enter the bought versions registration number. It will not install because you have obviously updated the iWork trial version. So it's now a newer version than the one you bought.
To make sure you get rid of everything so you can reinstall iWork.
(Copied & Pasted from Apple Support discussions.)
First, the applications - Hard Drive > Applications - Delete the entire iWork folder (containing the Keynote & Pages applications).
Second, the preferences - Hard Drive > Users > [your account] > Library > Preferences - Delete com.apple.iWork.Keynote.plist, com.apple.iWork.Pages.plist & com.apple.iWork.Installer.plist. Then do a search for iWork in Spotlight & trash any files or folders.
Third, receipts - Hard Drive > Library > Receipts - Delete Pages.pkg & Keynote 2.pkg. If there are any other packages with Pages, Keynote or iWork in their names, delete these as well.
If you have created any templates, you may not want to delete them. They are located in Hard Drive > Users > [your account] > Library > Application Support > iWork > Pages/Keynote > Templates > My Templates. Just move that iWork folder to the Desktop & you can move it back later.
It would be worthwhile to repair permissions before installing your purchased iWork. Don't forget to repair permissions after installing, too.
Best.