You can just walk up to him and say hi. Ask him about the machine he's using or something, then introduce yourself, it's only polite if he tells you his name too. Unless you think he'll recognize you then you can get a friend to do it for you.
Whether or not it's ok for him to be in a gym depends on the law.
Whether or not it's ok for him to be in a gym depends on the law.