8k valor = 2nd rank (Soldier)
30k valor = 3rd rank (Fighter)
So the bar at the top left of your screen should first count up to 8000, then reset and count to 30,000 to show your progress in ranks.
Your attributes should count the whole valor and therefore go up to 38,000 when reaching the 3rd Rank.
So, to answer your questions, both values are correct and - as the mentors already pointed out - the total valor needed for the 3rd Rank is 38,000.