There are posts like this around the forum. Try doing a search to find your answer to future questions.

In short, the best five card combination is the hand you go with.

You both have 8's and 7's with an A Kicker. You split the pot.