A lot of people are going to tell you the same, but a 5 gallon won't be big enough for more than just the betta and maybe some shrimp or snails.
In general, bettas enjoy living alone. I have one feisty guy who will eat anything he can and even nips at my snail if he thinks he has a chance to catch him poking further out of him shell.
If I were you I'd take the platy back. Platies like to school so you should have a small group (around 5 probably) anyway and there is not enough room in a 5 gal
for that. Your betta probably hates having to share space with one already and it may get stressed out feeling like he has to defend his territory all the time!
Hope that helps