When two objects P and Q are supplied with the same quantity of heat, the…