Unfortunately, you need to get him to a vet.

I know it's expensive, but maybe you can look into care credit? There are just so many things it could be.
From your post I couldn't tell if he's eating wet food or dry food. I assume he had struvite crystals - that's what c/d used to be for. However, the formula was changed to create a neutral pH, as many cats went on to have problems with caclium oxalate crystals. Most food not technically requiring a prescription by a vet work to acidify the urine. The current thinking is if struvite crystals are still a problem, this may help - but the real goal is to keep the urine as dilute as possible, so feeding as much wet food as possible rather than dry is really the goal. That said, dry is cheaper, and when you buy wet, basically what you're paying for is a lot of water. You can take the dry prescription food and mix it with water and microwave it and turn it into wet mush.
....just a sidebar with info on how to help avoid UTI issues.
As to his tummy - when it's hairballs, they usually throw up just shortly after eating. They feel hungry, so eat the dry food, which expands in the tummy, but the hairball is blocking its passage into the normal progress of the digestive system, so they vomit up undigested food. But if this were the cause, it should not occur hours later - the food should be digested.