The third-order law for magnetohydrodynamic turbulence with shear: Numerical investigation