You now have:
K = H(g^y ^ PrivU || PubU ^ x || PubS ^ PrivU || IdU || IdS )
S computes K = H(g^x ^ PrivS || PubS ^ y || PubU ^ PrivS || IdU || IdS )
I suggested removing the H and entering the concatenation of values
g^y ^ PrivU || PubU ^ x || PubS ^ PrivU || IdU || IdS
into the HKDF derivation of Master Secret (instead of the 0).,
You now have:
K = H(g^y ^ PrivU || PubU ^ x || PubS ^ PrivU || IdU || IdS )
S computes K = H(g^x ^ PrivS || PubS ^ y || PubU ^ PrivS || IdU || IdS )
I suggested removing the H and entering the concatenation of values
g^y ^ PrivU || PubU ^ x || PubS ^ PrivU || IdU || IdS
into the HKDF derivation of Master Secret (instead of the 0).,