the second link is correct (im biased because i wrote it!

)
in your two pair example, the 5th non paired card will decide who wins the pot. If the cards are the same its a split pot. You should bear in mind though that both players use the best 5 out of 7 cards so the 5th non paired card can be on the board and be used by both players (which would result in a split pot)