Thanks for your floo up FlyingStella. I don't know why you are mentioning the 2012 visit to an older man who paid for half of your ticket, or why you think this was a red flag to the customs officer. Did the 2012 visit come up at all in your discussion with the customs officer this time?
How did he accuse you of being a prostitute? That seems odd to me. I don't think 26 year old Canadian women typically travel to Costa Rica to work as prostitutes. What specifically did he say to accuse you of being a prostitute? What did you tell him that you do for a living?
It sounds like he was concerned that you couldn't pay for this vacation and that someone else was actually paying and/or that you weren't really going to Costa Rica, you were planning to leave the airport in For Lauderdale and stay in the US.