if you regestired the codes in orign first they auto regestir on your the sims 3 account -mypage, orign and the sims3 account use the same email and password if you used two different ones then try log in to the sims3 account with the origin email amd password
edit to add if you used two different emails also contact CS to assist with mergeing the accounts
some FAQ's that may help you
FAQ http://answers.ea.com/t5/The-Sims-3/FAQ-Invalid-and-Used-Serial-Codes-amp-Games-not-showing-up-in/m-p/194028#M8203
FAQ http://answers.ea.com/t5/The-Sims-3/Information-How-to-Register-The-Sims-3/m-p/387162#U387162
if in the event you need to contact CS if you keep getting the invalid message
1.https://help.ea.com/en/contact-us/
2.Click on the orange NEXT button
3.Select a platform
4.Click on the orange NEXT button
5.Select a topic and describe your problem in a few words
6.Click on the orange NEXT button
7.Click Chat Now to chat with a Game Advisor
guide on how to contact CS
http://answers.ea.com/t5/EA-Help-Beta/How-to-contact-a-Game-Advisor-using-the-new-EA-Help-page/td-p/2161281