Thermodynamic Transformations of Nonequilibrium States