From what I can make out, and bearing in mind the laws are a framework to get a game:
If it was a maul - which has then collapsed: scrum blue
If it was a "mess on the floor" - attacking (blue) scrum
If it was a tackle, and the ball was trapped - scrum team going forward (blue)
If it was a tackle and players not doing what they should - PK against (red/blue)
I'd argue that there is a potential for a tackle, so Blue should have released tackled player. BUT at that level, as it wasn't obviously a tackle, the quick whistle, explanation, and scrum is probably better. In all scrum scenarios the scrum goes to blue. So scrum blue.
I'd probably make my life easy by either calling the maul asap it formed (no doubt then) or calling "Tackle - Blue release" if I went down the tackle route. Speed of tought and decision, means you don't get stuck in the corner sometimes. Quick whistles also mean awarding the scrum (as opposed to PK) is easier, you can always use the (cringe) "It's a mess, blue going forward, scrum blue", and if a player starts to complain, you can usually shut them up pretty quickly with a "Would you rather I PK'ed your player for (holding on/not rolling/etc) on the floor?" (not said as a question - no debate to be entered into)
So I think you might (or might not) have got the technically correct decision, but I think you got the right decision for the game you were involved in. The thing to learn next is how to sell these decisions to the players/coaches/crowd. Which is where loud calls of T/R/M comes in, being confident, sounding authoritative and certain, no hessitation, and especially being right in most your other calls, and a loud explanation "Maul had formed, gone to ground, ball not available, red took it in, blue ball" or "Only a tackle there, ball not coming out, blue going forward, blue ball"