Sounds like they're tight and loosened up a bit after you warmed them up playing b-ball - try doing a 5-10 minute light general warm-up... a few minutes on a stationary bike, some jumping jacks, a few unweighted crunches, you get the idea, before your next workout.
And stretch them a little before, significantly about 4 hours after lifting.
As far as strengthening them, there's no one "best" - my favorite is plate drags, though. Set a plate on the floor and put the instep of the foot of your working leg on the plate, leg out to the side, and drag it across the floor in front of you. Side lunges work well too, though I'd wait on those until you get the flexibility worked out.
Enjoy a healthy groin -