Hi Dear,
Thanks for choosing healthcare magic.
According to your symptoms it appears to me that you have a
referred pain that is either coming from your lower back or from your testicles.
Because our body nerves are interconnected and some run from one place to another it's possible that a paine at a certain part of your body to refer to another part of your body. lower back, groin area,hips area are very close to each other and injuries around this area could result to an overall pain.
My suggestion for you is to first visit a
Urologist to rule out any kind of infection in your testicles,
prostate or kidneys.
Epididymitis or kidney stone can lead for the pain to refer to hips or lower back.
If tests from urologist are normal then you should visit Orthopaedic Doctor to check if you have any problems in your lower back or spine ,the doctor will do X-ray and/or
MRI to see the underlying cause. some disorders such as
herniated disk or
sciatica could lead to pain that reaches to lower parts of the body.
You can also consider visiting a Chiropractor as they might show a better treatment for your kind of condition.
Hope this helped.
If you have anymore questions don't hesitate to ask .
Wish you all the best.