Looks like a leak in the cooling system. Typically, the refrigerator stops working first, the freezer works longer. There is still some refrigerant in the system, so the back of the fridge is warm and the freezer (closer to the compressor) is yet cold