Given that g is the primitive root and n is the modulus. Party A(sender) secret key be $K_{a}$ and let party B(receiver) secret key be $K_{b}$.
Party A is aware of g,n and $K_{a}$ whereas Party B is aware of g,n and $K_{b}$ . Message sent by A to B will be $M_{ab}$ = $g^{K_{a}}$modn and message sent by party B to A will be $g^{K_{b}}$modn
$M_{ab}$ = 56 mod 23 = 8
$M_{ba}$ = 515 mod 23 = 19
The DH key for party A will be (Mba)6 mod 23 which is equal to DH key for party B which is, (Mab)15 mod 23.
(Mba)6 mod 23 = (Mab)15 mod 23 = (19)6 mod 23 = (8)15 mod 23 = 2