Yesterday I bought 3 balloon mollies to put in a 20L tank, which I also added my male Betta shortly after. How long should it take for them to get along? My Betta was a little defensive, not attacking the mollies, but showing signs of flaring. The mollies are hiding at the moment.
Betta can be housed with various other fish but in your case, you're short on space. 20L (5 gal) is about what is recommended for only a betta. Various sources seem to place the min tank requirement at 75L (20 gal) for mollies but some say 37L (10 gal) is fine. So as you can see, the your best guess would be to upgrade to a large tank or to split them in two tank. The betta in your current one and a larger for the mollies.
If you do split or upgrade please make sure the tank is/are cycled before getting the fish in them or you risk loosing some/all.