(number)(letter) (raised number)(number)(letter) (raised number).
Generally, the valence electrons are the electrons in the outermost shell - in other words, the last electrons added. As electrons are added to an atom, they are sorted into different "orbitals" - basically different areas around the nucleus that the electrons congregate in.
See below for a quick run-through or skip this step to get right to the answers. Understanding why transition metals don't really "work" like the rest of the periodic table requires a little explanation of the way electrons behave in atoms. Understand that transition metals don't have "traditional" valence electrons.