OK so assuming you're on 0% commission (ie using Smarkets / Oddsmonkey offer), then first horse back at your original stake of £10 (or £10 plus 2% or 5% depending on commission.
If it loses then yes don't do anything more - you've made your original stake back, so not lost anything.
If it wins then at lay odds of 4.0, you'll lose £30 in liability at the exchange.
The next lay you want to make sure you cover your original £10 stake, plus your £30 loss of liability from the first race (plus commission), so laying £40 (or £40 plus 2 or 5%) again just covers your costs if it loses.
Laying £40 at 1.91 costs £36 in liability if it wins, but if it does win your back stake wins £140 overall giving you a profit of £140 less £36 liability from race 2 and £30 from race 1, so £74 profit.
You might want to guarantee profit regardless of outcome, so if you layed say £80: if horse wins race 2, your profit would be £140 less £30 race 1 liability less £73 race 2 liability, so £37 profit. If horse loses race two your profit is £80 less £30 race 1 liability less £10 original stake, so £40.
Hope that's right...!