Soldering back the disconnected wires from the charger board
See the rectangle called USB with 4 holes in a row.

Of those 4 holes red goes in the hole closest to edge of the board and black in the one at the other end.

How I decided that.

It's a charger circuit board and the designer designed it to take a USB socket for output (or instead a 2 pin socket like JST).
the 4 holes ans two slots are the footprint (board pattern) for common USB A sockets. also USB is printed on the board,

The two holes where the wire goes are the power pins of a USB socket.
In the photo of the underside I could see the broken ends of the wire outlined in the solder, so I was failly sure the wire had come from there.

In the photo of the top I looked at the nearby capacitor and saw negative next to one pin (and connected to it on the underside), so that one is negative and the other is positive. (I could have looked this up on-line, but there was enough in the photo).

Red is almost always positive and black is almost always negative so I said to connect the wires that way.

If the wires had been pink and purple I would not have been able to guess which way round to connect them.