Well, you basically have 4 choices.
1) Return door and order custom for your skinny walls.
2) See if you can hang you new door in the existing frame.
3) Install new door flush to the hallway side and build out the trim in the bedroom.
4) Rip the new frame with a table saw to the width you need and install door.
__________________
A Picture Is Worth A Thousand Words
Especially In The DIY Chatroom
-NEW MEMBERS-
Please include your basic location in your profile. Some of the answers given are specific to a Region or State.