Google instructions on 'framing an attic hatch'. At a minimum, you want the cut joist to T into something across the two good joists.
You also want to put short joists (going in the same direction as the rest of the joists) as close to the plumbing as practical to support the edge of the flooring.
If you already have a compressor available, a palm nailer will drive the joist hanger nails in tight spaces quite nicely.
Here's a bit of a diagram to show how the new parts should go. It's probably best to assemble them with joist hangers (ie, Simpson LU28, if the joist is a 2x8). You'll have to notch a little for the plumbing on the right. (These notches are perhaps the worst type of notches you can put into a floor joist, so make them as small as possible.)
If the joist on the left is rotten all the way along, I'd sister an additional joist through as much of the length as you can manage. (Glue and screw.) If it's just the very end, you could extend the perpendicular joist to the next good joist, but in that case, double the perpendicular.