I'm not a professional electrician so take it for what it is worth. I would turn off the breaker at the main panel (should be a dual pole 50 amp), go to the spa panel and double check the wires are cold before touching, disconnect everything, then nail on a j-box to a stud, run the wires into them, put wire caps over the exposed wires, push the wires into the j-box, and close off with a solid cover plate.
BTW, if you are unsure how to do this safely or don't have the tools to do things like check to make sure the wire is not hot then it is better to let this deal slide than risk anything. Your health is worth much more than a good deal.