Thanks for your query.Based on the facts that you have posted it appears that you have been diagnosed to have infection of the testicle ( Orchitis) confirmed by ultrasound
scanning and has been advised to take Cefalexin
Both these drugs will help to combat infection .
Please take anti inflammatory medication like Diclofenac
twice daily along with these drugs that will help to subside the swelling and pain in testicle.
Ensure to drink more water,