Keep both dragons separated, since one is obvious has not been eating well for some time. Remove the sand, especially if she is under 10" long and if the sand is anything else other than washed children's play sand.
Because of the stress of having cats trying to eat her, put her in a quiet location, and keep the cats away from her (put her into a room that you can keep the cats out of constantly, so she doesn't get stressed by them. Also, you won't have to worry about the cats breaking into the screen again). Check her carefully for any scratches or bites. These may not be bleeding at all, but check closely. Once any bites have been treated with neosporin (as the other poster suggested) and if any bites h ave been found, put her on plain papertowel, if you haven't already removed the sand for reasons mentioned above. You don't want sand sticking to the neosporin and causing irritations.
Leave her alone except to check on her progress for a couple days. Offer food but don't worry if she doesn't eat for a couple days. Being chased around by a cat and probably carried by one, as you didn't indicate the tank was tiped over for her to run out, is very stressful. IN a couple days, offer her appropriately sized insects (no bigger than space between her eyes, soft bodies insects, such as silkworms or butterworms, can be a bit bigger) and offer her wholesome greens, a mixture of several good stables, like dandilion greens, collard greens, endive or escaroli, plus other vegetables and some fruit. (see the nutrition chart at the website the other poster indicated, it is really great on showing what greens are good for dragons, how often t hey can be fed etc). Though string beans are fine to feed dragons, it shouldn't be the primary vegetiable they eat. If that is the only kind they eat, then I suggest feeding very little or none, to encourage them to eat a variety.
If there are alot of wounds, especially deep ones or those that have bled or are bleeding, I would take your dragon to the vet asap. ALso, if she shows any limping, swelling or refuses any food and becomes very lathargic after a day or two, or even if she shows it right away, again, take her to a vet right away. These could be signs of serious internal injuries that will need immediate attention.
-----
PHLdyPayne