That sounds like a good idea you think a 5 gallon is to small to divide I would really like to pick a betta up from Walmart they look so sad in there
5 gallons is okay to divide but personally I wouldn't want to use 2 dividers in there for that size, I believe every betta should have 2.5 gal or more. What I did for my 10 gal tank is I took an extra piece of craft mesh and used plastic paper clips to attach it to the top of my divider. I cut it so that with my hood on, there's no space the bettas can jump over above the divider.
Sorry if that sounds confusing. If you want me to show a picture, I will just let me know:)