We will first show that Δ PAM is similar to Δ QBM.

Angle A = 90 and angle B = 90 as they are angles in a square

angle PMA = angle QMB as these are the included angles between two straight lines intersecting at one point.

Since two angles in ΔPAM are equal to two corresponding angles in ΔQBM, the third angle in each are also equal. Hence the two triangles are similar.

Now AM = MB as M is the midpoint. So in similar triangles, if a side is equal to a side in the other, they become CONGRUENT. It means other sides in ΔPAM are also equal to sides in ΔQMB

=============================================

we show that ΔMPC and ΔMQC are congruent.

Since ΔPMA and ΔQMB are congruent, side PM = MQ

Side MC is present in both ΔMPC and ΔMQC.

Angle CMP = angle CMQ = 90 deg as PQ is perpendicular to CM - given

So two sides and one angle in ΔMPC are equal to corresponding sides and angle in ΔMQC.

So they are congruent. Hence CP = CQ.