**Getting out**

For getting out of the Toad, the simplest way would be to [teleport ][1]. 


Another way would be to dominate the Toad to spit the swallowed character (for example with [dominate beast][2]


After that, I the other options I see depend on your DM.
You could try to force the Toad to vomit by creating a reaction in her stomach (by creating gas or fire inside it [or disgusting material that would provoke the toad to gag])


<br>
**Transforming with a person inside**

As it is not explain in the rules, this would depend on your GM. But as marked in the wild shape description, I would revert the process:

> You choose whether your Equipment falls to the ground in your space, merges into your new form, or is worn by it. Worn Equipment functions as normal, but the DM decides whether it is practical for the new form to wear a piece of Equipment, based on the creature's shape and size. Your Equipment doesn't change size or shape to match the new form, and any Equipment that the new form can't wear must either fall to the ground or merge with it. Equipment that merges with the form has no effect until you leave the form.

It is about the equipment and only concerning the process to transform from humanoid to beast, but I think it could apply to this situation. The character swallowed would fall on the ground in front of the druid.


  [1]: https://roll20.net/compendium/dnd5e/Teleport#h-Teleport
  [2]: https://roll20.net/compendium/dnd5e/Dominate%20Beast#h-Dominate%20Beast