We have some eternal inputs which are used directly or indirectly by the elements of the circuit to obtain output. The elements or the gates which receive all their input from the external inputs directly constitute the logical level one of the circuit while the gates which receive at least one input from the output of the gates of level one and not higher are under the logical level two of the circuit. Similarly we get 3rd and 4th level and so on.
From the above circuit we can see that only gate 1 is receiving all the input from external inputs derectly hence gate 1 is in logic level1
As gate 2 is receiving one input directly while the other input from gate 1 so gate 2 is in level 2 of the circuit.
Gate 3 receives the1st input directly from external input, 2nd input from output of gate 1 but it is not a level 2 gate as it is also receiving its third input which is from gate 2 (a level 2 gate), hence gate 3 is a level 3 gate.