Those could just be stock photos. Also, those are Dorman, not OEM, so there's bound to be some negligible differences. Regardless, they're the same concept. A barbed tube on one end to stab into the nylon hose and a quick connect fitting on the other end. One is 3/8" and the other is 5/16". I'd prefer to minimize splices and avoid compression style fittings in a fuel system, which is why I'd just get new lines if that were an option. But the barbed stuff is really reliable. It's just really hard to press it in. If it weren't, I'd be concerned it'd leak.
If you're doubting a fitting is correct, test it out on a new fuel pump- yours (if you haven't installed it yet) or one at the parts store. At the bare minimum, you need one of each size and to press them into the remaining cut ends of the hoses. You just need to confirm that you can get enough slack to reach the fittings on the fuel pump bulkhead.
If they won't reach, you could get a couple pieces of 3/8" and 5/16" nylon tubing and splice it onto the existing cut hoses to lengthen them. I'd really try to get slack outta the lines first, even if it meant unsnapping them from some hold-downs, before adding additional splice points. I don't know where you'd get small pieces of that tubing, though. I had to buy a 10' roll of each size. Also, I'd use a brass double-barbed fitting before I used a compression union.
Here's a video showing how all the types of fittings we're discussing are pressed in:
Keep in mind that whatever you do, you'll be doing it on the ground, on your back and in cramped areas unless you remove the remainders of the lines you cut to repair them outside of the vehicle. Considering this, it might be worth it to make it plug-and-play with new lines. They're not very long at all. Just know that to disconnect them, you have to first push really hard inward on the connector then squeeze the locking tangs (or slide the lock tab if it's an OEM style) before pulling it back off the nipple.