use Henderson-Hasselbalch equation.
pH=pKa + log (Base/acid)
you have to use pKa 7.21(pka1=2.12, pKa2=7.21, pKa3=12.32) because it is closed to your pH.
7.40= 7.21+ log(HPO4-2/H2PO4-)
log(HPO4-2/H2PO4-)=0.19
(HPO4-2/H2PO4-)=10^0.19
= 1.5
don't worry about this kind of questions my persian firend. 😉
good luck