Hi there and welcome
you have to use the same Apple ID, it will be the only way.
What stopped you from using it on the phone?
Yes, go to settings, iCloud and sign out then sign in with the correct one
What then happens?
(It also sounded like you tried to create an Apple ID not sign in with it)
Ok, no problem
try to connect it please to a different USB port on the computer
Does it then connect?
what do you see on the screen of the phone?
ok, and then what do you see on the screen?
ok, now reopen itunes, what do you see?
ok, is the iPhone being detected now?
and where the contacts on the iPhone (and where did they dissapear from)?
ok, but you synced your iPhone to your computer which overrides everything there, this is why they are gone..
Did you ever make a backup of these?
In which program on the Mac where they installed?
ok, you would need to restore them from this backup so that are added back.
Are you still working with me on this?
Is the phone now up and running correctly?
ok, I am not sure though why you went and synched it, we should of remained in synch on my steps...
But the only way to now get them back is from your backup you indicated you made from them
If you would like any additional information or assistance, please do not hesitate to let me know.
And please take a second to rate my service by clicking one of the stars at the top of the screen then submit