When in doubt if you've finished your period or not, you can check using a bit of cotton or tissue my inserting it just into the mouth of the vagina. The method described is to squat a bit and insert the piece of tissue or cotton and stand up and after a few seconds remove the cotton. If it has blood on it either red or dark brown then your period is not over (apologies for being very open but it's necessary for these rules to be understood).
If you see that there is no blood, then you can do ghusl and pray. Sometimes however it is possible that the blood will stop completely and then a small amount maybe discharged the next day. In this case, you just need to check again and if clean do your ghusl.