It will work fine for 5 miles. However, I would not put much money into it.
If you end up liking commuting using a bike, you will most likely purchase something better. Grab a backpack and save your money for now.
I started with a heavy MTB huffy for a 4 mile commute to the bus. Eventually, I concluded I was hooked and purchased a hybrid. Later the hybrid was exchanged for a touring bike.