A Nash equilibrium is defined to be a (mixed or pure) strategy for which no player have incentive to unilaterally deviate from his or her current strategy.
In this definition, there is nothing said about the payoff to each players having being equal at the Nash equilibrium. But in most games, such as matching pennies and prisoner's dilemma. The Nash equilibrium gives equal payoff to each player.
Can anyone resolve this question for me?
Put it in mathematical terms. Consider a game $G$ with players $P1,P2$, with utility fuctions $U_1, U_2$. The players attempt to maximize his or her own utility. Then the mixed strategy $p^* = (p_1^*, p_2^*)$ is a Nash equilibrium if for any mixed strategies $p_1, p_2$,
$U_1(p_1^*, p_2) \geq U_1(p_1, p_2)$ and $U_2(p_2^*, p_1) \geq U_2(p_2, p_1)$
How does this then imply $U_1(p_1^*, p_2) = U_2(p_2^*, p_1)$?
Your two examples are symmetric games, a special case where the strategies and the payoffs of the players are the same up to appropriate permutations. More formally, assuming two players for simplicity, they have the same set of pure strategies $(S_1=S_2)$ and their payoffs are such that $u_1(s_1,s_2) = u_2(s_2,s_1)$. As a consequence, at a symmetric equilibrium where both players play the same strategies, they have the same payoffs. It is only the symmetry assumption that drives the equality of payoffs.