Yes, but the issue with printers tends to be parts cost vs. whole brand new unit replacement totals out the machine with printers. In addition to that with these HPs unless you can somehow remove the printhead/cartridge carrier from the track belt, encoder strip and support bars without damage you need to change out the entire mech which usually means you need a donor.
Make your friend replace the printer if you really feel like you need to be “made whole” or can’t buy one yourself, or it gets you closure. Even if you just replaced the mech, you still have original waste ink pads and the rest of it is still original. Consumer grade printers are built to be easily recycled on a disassembly line, not repaired.