Sounds like a good plan but your going to find issue with combining species of frogs since the toxins between different species of frogs are going to slowly poison each other over time. The toxins are transmitted through the frogs soaking in water and the trace they leave behind and absorb as they travel and perch throughout the tank.
Sorry to be negative in your idea but you will find on all forums that keeping different species of frogs in the same tank is very frowned upon due to these issues.
You might also rethink water depth unless you provide plenty of escape routes for these frogs since they are not good swimmers and can drown in water they can't get their head out of.
A 40 gallon tank would be pretty awesome if built vertically for either of these frogs since they love to spend most of their time up high in a canopy and are rarely found on the substrate.
Don