I purchased an e-bike which was advertised as just needing the batteries replaced. The li-ion batteries had been sitting dead for months. Once I got the battery removed it was clear that was not the case. You can see the hole where the plastic melted from this component overheating on the board. The burnt one is the same as those in the center of this photo.
What is it and how do I determine the correct replacement?
I dont think the resistors are faulty but the design. Resistors (especially low-ish value 22Ohm ones) are meant to dissipate energy as heat. Putting them in a cramped housing made of plastic, then using them to dissipate high power is going to build up heat in there. There could also be another component faulty that puts too much current into the resistors. They are probably part of the balancing circuit.