In this paper,the cooling process of a short scale-length plasma after the short driving laser pulse termination is studied by solving the hydrodynamic equations of a plasma with numical calculation.The contributions of heat conduct,work done by expanding and energy loss by radiation are discussed.Then gain coefficients of several possible transitions for wavelength less 20 nm in MgXI plasmas are calculated with the plasma parameters obtained from the solution of hydrodynamic equations. The influences of environment to them are analysed. The possibility of producing a soft X-ray laser near by water-window in MgXI plasmas is predicated.