I have iPhone 4 and got iPhone 5 how can i transfer everything from 4 to 5?

I want to use the iphone 5, is there anyway to transfer all the data, apps, accounts, etc to the new one?

Yes. If you have all the data on the iPhone 4 backed up in iTunes, then you can restore that data onto the new phone when you're syncing it up to the same iTunes account.

I backed it up in icloud but who can i put it in the iphone 5, it should show the option when i open the phone for the first time, but i opended befor as new user

IF you have a backup of the 4's contents in iCloud then you need to set up the 5 from a backup--not set up as a new phone. Best luck.