Suppose the shareholder currently has 5 shares (any number will do – the answer will still be the same). These 5 shares are currently worth a total of 5 x $4 = $20 The buy 1 more share for $3.10
So they now have 6 shares, and for ‘no gain / no loss’ these shares need to be worth in total $20 + $3.10 = $23.10