Hard to say, but if her nerves or tendons or joints are inflamed, turmeric powder works wonders, as does Apple Cider Vinegar.
Make a watery paste with turmeric and water or turmeric and apple cider vinegar, soak a cloth in it, and then wrap the leg with the cloth. Keep on for about an hour, every day, and you should notice a difference with how your dog is walking.
If you feel up to it, Google turmeric and apple cider vinegar and read about their wonderful healing benefits. I use mustard, too, when I’m out of turmeric.
I’d do a good check on your dog to make sure it’s all right.
The best you can do for an old dog, and some dogs are old at 12 years as it depends on the breed, is make sure it is eating healthy and getting his exercise.
Other than that and giving him a good hug, not much you can do.
Turmeric is an herbal anti-inflammatory and it does do some good, either orally or topically. But be aware of the staining problem, it’ll turn your dog’s coat and skin as yellow as yellow curry. It actually is what makes curry yellow.