Unless life changing amounts of money are involved, I disapprove of hedging, per my seventh commandment of gambling.
I'm going to ignore the fact that if you hit the 5 you could hedge more to lock in an even larger win, and just look at this as if it ended after a 5 or 7. At this point your net will will be $785 or $50. You should start by taking down the odds bet. That will change the scenario to winning $755 or $70. Then you should lay the odds on the 5. Let b represent your lay bet against the 5. If you lose the bet, you’ll have $755-$b. If you win the bet, you’ll have $70 + (19/31)×$b. So, equate the two sides, and solve for b:
755-b = 70 +(19/31)×b
685 = (50/31)×b
b=424.7
That will lock in a win of $330.30. So, if rounding were not an issue, then lay $424.7 against the 5. However, rounding always is an issue, so I would lay $403 against the 5 ($390, plus $13 commission on possible win of $260).