I imagine the wires were loose, not connected tightly, looks like they melted because of that. I would go ahead and cut them back, wire nut them securely.
When you have a melt-down like that, usually the wire insulation fuses the wire strands together, you have to go back further on the wire to find good copper to make the connection.
Give it a try, it's fused, so you will be fine. Kill the power, then verify it is dead before proceeding.
As a last test, I take the bare wire and use insulated needle-nose pliars..on the insulation, touch the wire to a ground to insure the circuit is dead. (This is stated not knowing the P.O.'s availability of a good meter, and his abilities.)
Safety...safety....