That should be similar to how I did unlocking skills.
Give each skill sprite a new variable "level".
-If skillsprite is selected & aqquired(or unlocked) & .level <=2
then make UpgadeSkilButton(or whatever) visible
else make it invis
-UpgradeButton is clicked & selected skill.level <=2
then add 1 to selectedskill.level
Something like that might work)