The given reactions describe the Borax Bead Test.
When borax (Na2B4O7⋅10H2O) is heated, it first loses water and then melts to form a transparent glassy bead consisting of sodium metaborate (NaBO2) and boric anhydride (B2O3).
Na2B4O7Δ2NaBO2(X)+B2O3(Y)
In the non-luminous (oxidizing) flame, B2O3 reacts with CuSO4 to form copper(II) metaborate (Z), which is blue in color.
CuSO4+B2O3Non−LuminousCu(BO2)2(Z)+SO3
In Cu(BO2)2, the oxidation state of Cu is +2.
In the luminous (reducing) flame, the copper(II) metaborate is reduced by carbon to copper(I) metaborate (Q), which is colorless/red.
2Cu(BO2)2(Z)+2NaBO2(X)+CLuminous2CuBO2(Q)+Na2B4O7+CO
In CuBO2, the oxidation state of Cu is +1.
Therefore, the oxidation states of Cu in Z and Q are +2 and +1 respectively.