Its electronic configuration is $4d^15s^2$ so in normal state it has valence=1 and in energetic state, valence=2 (because our teacher said we count only the electrons in the outer shell firstly) and valence =3. First question: is it true what my teacher said? It was for Z=22 example, where she said it has the valence 2 and 4). Second question when we form the oxide we should use only the valence in the energetic states and not the one in the normal state?
I am not sure that I understand your question, but in terms of establishing the valency in this case the key point is that in d block elements the energy level of the outer s electrons are very similar to that of the d electrons in the shell below, so the valency in this case will be 3.