Geometric Distribution: Playing a Game with Cost Suppose I have \$3,000. I play a game, for which I have a probability $p$ of winning.
I have to pay \$300 each time I play the game. If I win, then I earn a payoff of \$500. I can play the game as many times as I like, provided I have money to play.
I realize that my expected cost of playing this game is -\$300(1/$p$). Is my overall expected payoff therefore:
-\$300(1/p)+\$500
?

Not quite, you need to consider the max money you have at your disposal. For ex. if $p$ is small then you are likely to waste all your money before getting any reward, so your formula would not be correct. On the other hand this limit does also have the effect of limiting your loss, it can never go beyond 3000.
I wrote a simple simulation in R to simulate the returns of this game for various $p$'s (rounded to nearest integer)
money=3000
pay=300
rew=500

game=function(p) {
  mean(
    replicate(1e5,{
      sek=sample(
        c(0,1),
        floor(money/pay),
        replace=T,
        prob=c(1-p,p)
      )
      if (any(sek==1)) {
        fst=which.max(sek)
        r=1
      } else {
        fst=floor(money/pay)
        r=0
      }
      -fst*pay+rew*r
    })
  )
}

setNames(
  round(sapply(seq(0.1,0.9,0.1),game)),
  seq(0.1,0.9,0.1)
)
    
  0.1   0.2   0.3   0.4   0.5   0.6   0.7   0.8   0.9 
-1627  -893  -486  -247  -102     0    72   125   166

compare this to your formula
setNames(
  round(-300*(1/seq(0.1,0.9,0.1))+500),
  seq(0.1,0.9,0.1)
)

  0.1   0.2   0.3   0.4   0.5   0.6   0.7   0.8   0.9 
-2500 -1000  -500  -250  -100     0    71   125   167

