If the semen was released, then ghusl must be performed before offering the prayers. The release of another fluid, such as what may be released during foreplay and sexual urges does not obligate ghusl.
If he did istibra, which is the process of ensuring that there is no urine left in the urethra, or if he knew that the urethra had no urine left because he waited for some time after urination or because of any other reason, then the prayer is valid and he should not pay attention to this doubt. If this was not the case, and he doubts whether the liquid was urine or not, then he should treat it as urine, consider the wudhu and the prayer as void, and purify the body and clothes that the liquid came into contact with.
We advise you to have a ring that does not have any holy name written on it, which you are free to wear in any place, and wear the mentioned ring with the holy names written on it when you are praying.