Temperature dependence of the X-ray absorption near-edge structure (XANES) spectra at the Pr $L_{3}$- and Tb $L_{3}$-edges was measured for the (Pr$_{1-y}$Tb$_{y})_{0.7}$Ca$_{0.3}$CoO$_{3}$ system, in which a metal-insulator (MI) and spin-state (SS) transition took place simultaneously at a critical temperature $T_{rm MI}$. A small increase in the valence of the terbium ion was found below $T_{rm MI}$, besides the enhancement of the praseodymium valence; the trivalent states, which are stable at room temperature, change to a 3+/4+ ionic mixture at low temperatures. In particular for the $y$=0.2 sample, the average valence determined at 8 K amounts to 3.03+ and 3.25+ for the Tb and Pr ion, respectively. In analogous (Pr$_{1-y}$RE$_{y})_{0.7}$Ca$_{0.3}$CoO$_{3}$ samples (RE=Sm and Eu), in which the MI-SS transition also took place, no valence shift of the RE ion was detected in the XANES spectra at the RE ion $L_{3}$-edge. The role of the substituted RE ion for the Pr-site on the MI-SS transition is discussed.