First of all, we have a REDOX reaction here because we have loss and gain of electrons. The process of electrolysis is accompanied by the redox reaction.
Explanation:
3Sn(s) + 2NO3–(aq) + 8H+(aq) → 3Sn2+(aq) + 2NO(g) + 4H2O(l)
On the left, we have Sn (s) with an oxidation number equal to 0, then on the right we have Sn+2, so it lost electrons because it gained a positive charge. If we lose electrons, then we have oxidation, and it takes place at the anode. Thus, the anode is composed of tin.
Reaction at the anode:
Sn (s) => Sn+2 (aq) + 2e-
----------------------------------------------------------------------------------------------------------------
We have on the left N in NO3 which oxidation number is +6, and on the left N in NO has +2 as oxidation number.
We can say that the oxidation number decreases from +6 to +2. Therefore, we have a reduction of NO3 and it takes place at the cathode. The cathode is composed of Pt.
Reaction at the cathode:
NO3- (aq) + 4H+ (aq) + 3e- => NO (g) + 2 H2O (l)
---------------------------------------------------------------------------------------------------------------
To get to the complete reaction, we must multiply by 3 the reaction at the anode, and by 2 the reaction at the cathode. After that, we add both reactions together.