First player has Ace Seven.
Second player has Ace Seven.
Third Player has pocket Jacks.
Community cards are A J 5 5 5.
What is the winning hand in this situation?
Consider the best 5-card hand that each player can create from 5 cards. (Since you didn't specify the suits, this assumes that nobody can create a flush.)
Players 1 and 2 have
A 7 A J 5 5 5. The best hand from these cards is a full house:
5 5 5 A A.
Player 3 has
J J A J 5 5 5. The best hand from these cards is also a full house:
J J J 5 5.
Since the third player's 3-set (jacks) is higher than the other players' 3-set (fives), player 3 wins the pot.