You are c/o pain in anus while you are walking, coughing and sneezing
and You are able to feel a hard area in the painful spot. You have not mentioned since how long you are having this problem. you are going to gym for the last 6 wks. Otherwise your anus looks healthy. You may have either one of the problem.
1) Initial stage of piles called as !st degree or internal piles - as the name implies you can't feel it as it is inside the anus. Pain may get severe while defecation, coughing and sneezing
2) Peri anal hardness may be due to the initial stage of abscess
which starts even by a scratch.
Regarding gym it is not advised to do wt. lifting or exercises (which increases the intra abdominal pressure) Consult a surgeon and follow his advise