L.B.
Hi S.,
The answer to your question is yes. This has been done for generations.
When I was 7, my sister was born. My parents kept her in the bassinet in their room the first few months. When she was old enough for the crib, in she came to my room.
When my son 2nd child was born, I transitioned him into his brothers room. Not a 5 yr old but a 3 yr old got the crib set up in his room and a roomie. They are now teens and still share a room.
Don't stress too much about it. Your 5 yr old will get used to his roommate pretty quick.
Good luck