Na2HPO4 is amphoteric: write the two reactions
$\ce{Na2HPO4}$ is dissociated in solution. The amphoteric species is actually the hydrogen phosphate dianion:

Reaction as an acid:
$$\ce{HPO4^{2-} + H2O &lt;=&gt; PO4^{3-} + H3O+}$$

Reaction as a base:
$$\ce{HPO4^{2-} + H2O &lt;=&gt; H2PO4- + OH-}$$