Strategy for replacing leaky tub trap
I would simply cut back a bit further than you have marked, then extend with couplers to the original pipe lengths and add your elbows and trap components. This will leave you with exactly the same configuration, which was fine, but with the two additional couplers. 

Obviously we like to reduce the number of connections in a system, but modern plastic piping is hard to screw up if you're careful to coat things well with cement.