Need Help: 240v in Garage?
What size are the wires feeding the garage panel? They look too small to support a 50 amp load. If they are #6 or larger (smaller number), then OK. The most important thing in any wiring job is to not overload the ampacity of the wiring.
Also, as the garage panel is a secondary panel, the ground wires must be isolated from the neutral wires. Your box is already setup correctly for this, but don't put any white wires on the green/bare wire buss or vice versa. You can do this on the main panel though.