Accessing Variables from other class

Hi! As an example I have a variable in the GameInstance class let name it skillPoints and I need to modify it value using the PlayerState class. What is the code for casting? I need to add 1 skill points every time an event is triggered.
Thank you in advance!

MyGameInstance* instance = Cast<MyGameInstance*>(gameInstanceRef);


I cannot understand. How can I access the GameInstance located skillPoints variable from the PlayerState?