Could I cut out the affected area in a termite damaged joist or would I need to replace the whole joist if it's rotted at the end
In my estimation, that is not at all load bearing, it simply holds the flooring above up to keep it from being bouncy.
As short as it is, I'd suggest replacing the whole thing. With termite damage that severe at one end, you don't know how far into the middle of the remaining portion they may have eaten, so might as well get rid of the whole thing. The hard part is getting the board long enough to fully bear on both sills while being short enough for you to be able to actually get it in place - I'd imagine the original was dropped into those slots from above before the flooring went down.
I would be tempted to cut it to length, then cut it in half. This would allow you to slip each end into the notch for it and have them meet in the middle. Of course, now that it's cut in the middle means it's not going to support much. To fix that, take the left over piece of that 10' 2x10* you bought and sister it across the entire span. Sure, a 5' scab is probably overkill, but you've got the lumber, so why not. I believe that the general rule is about 2' on either side of a split/break, so you're only exceeding that by about 6&quot; so why bother cutting it shorter.
Unfortunately, this will leave the floor boards above not attached to the joist, so you risk them squeaking. Pick up a floor squeak fix kit that includes clips that will screw into the bottom of the flooring, then into the side of the new joist. Putting one on every other floor plank above will probably do the trick. Leave the ceiling open for a week or so to see if that's sufficient, if not, add more.

*The existing joist looks to be rather old and rough finished, as a matter of fact, it looks like much of the lumber in my house. That means there's a non-zero chance that it's actually 2&quot; x 10&quot;, not a nominal 2x10 (i.e. 1.5&quot; x 9.5&quot;). If that's the case, make sure you buy a 2x12 as your new floor joist, then notch down the ends to the exact height you need to slip into that pocket in the wall. If you don't, your nominal 2x10 will sit on the bottom of the pocket and not reach up to the floor, or you'll attach it to the flooring, but it won't rest on the bottom of the notch.
Oh, and your nominal 2x12 won't be wide enough to fully fill the pocket, either. That's less of a concern, since you'll be sistering 2 pieces. The 3&quot; bearing surface against the flooring above, as well as the squeak-fix clips, should prevent it from twisting, turning, or &quot;sliding&quot; around in the pocket. However, you could use some 1/2&quot; plywood shims to get a nice snug fit into the pockets, if desired. Cut the plywood to fit and drive the shims home (hammer and a sacrificial scrap of 2x4) after you've got the joist in place. Remember, too, that 1/2&quot; plywood is also a nominal size ranging from about 0.4&quot; to about 0.6&quot; so be sure that you're getting ply on the thicker end of that range. Easier to sand it down to fit than to try to add additional wedges/shims.