Hi. I'm Dr. Lee and will do my best to help.
If you are sure that the swelling and redness is from trauma (jammed the nail), then only resting will help, as well as using dog specific non-steroidal anti-inflammatory drugs. Human NSAIDs like Ibuprofen is not good for dogs because dogs cannot metabolize them well, thus can become toxic very easily. For pain control, the only human drug that is good is tramadol, which is a human prescription pain killer. If you have that drug, let me know and I can get you the dosing. I would suggest to have your veterinarian examine the toe and also get dog specific NSAIDs for the swelling.
Please let me know if you have any questions or concerns. Thanks.
You can continue the cephalexin and gentocin, it certainly wouldn't hurt. The gentocin has a steroid there so it might help with the swelling as well. But the best way is definitely to get dog specific NSAIDs from your veterinarian.