Well, without knowing what to do, you did pretty well. You must've been more than 5 degrees off the wind, I suspect probably more like 15-20 degrees, or you'd be mostly still luffing with the
jib aback. What you were doing was pointing, or "pinching" way up so that you made little or no progress, but weren't heeling too bad.
What to do next time (besides "don't go out in 20-25 knots if you don't have reefing")?
Depends a little on whether you have to get upwind or downwind. Upwind, sheet the
jib in and luff the main all the way out if you have to in the puffs. It's called a "fisherman's reef" and you'll grow arm muscles easing and trimming. But it's the best you can do if no reefing, though kind of tough to do singlehanded. If you're still overpowered, you'll have to take the
jib down (if you can) and tough it out on a close reach with just the main
Reaching? Same advice as above, though maybe you could do it with main alone, mostly aluff.
Broad reaching or running? Try it with just the
jib. Or maybe you could do it with just the main, but try
jib-alone, less overpowering.
Trouble is, it's hard to lower and secure, or raise, either sail once you're out there in all that wind and sea. So my fallback advice (see above) is "don't go out in 20-25 knots" if you can help it.
But you live and you learn. Sounds like you're learning.
Maybe go see your sailmaker about putting some jiffy-reefing cringles and reinforcing on that main. Doesn't take too much additional hardware to
rig it. Then you can forget my advice above, just reef and go.