16

Let’s work through this step by step:

First Ricardo started with a certain number of golf balls. Let’s call that number GB. We don’t know what it is but we have enough information in the question to figure it out.

Ricardo starts with GB, loses 6 (so in math terms that is minus 6), bought 12 (which is plus 12) then lost 4 more (so minus 4). He currently as 18.

We can take the number he started with, GB, subtract 6, add 12, minus 4 and end up with the number he has now which is 18. We can write all this as:

##GB-6+12-4=18##

To solve for GB, the number of golf balls he started with, let’s first combine the math terms on the left hand side of the equation:

##GB+2=18##

We can now subtract 2 from both sides and find that:

##GB=16##