Hi,
Thanks for the query.
Carcinoma of the testes can spread to the prostate, as it is a neighboring structure. But the incidence is small. Follow up is very important in case of testicular cancer as the incidence of recurence is higher.
And the pain you are complaining of can be attributed to prolonged masturbation and also past surgery. Do talk to your doctor about the same. He will examine you and give you further information.
Wish you better health.