Given two substitute goods (X and Y) with demand and supply function; Qd = 7p…