Here two cases of the probability,
p > 1/2 or p <1/2
Here, q = 1 - p
So, When p > 1/2 the q < 1/2 &
When p < 1/2 the q > 1/2
So, in first case (p > 1/2 the q < 1/2) Winning chances is more compare to Loosing, So put the Bet maximum and is of $1
Another case (p < 1/2 the q > 1/2) Winning chances is less compare to Loosing, So put the Bet minimum and is of $0.5