It is balanced, Holy Assassin. And don't give him the answer, then he won't learn.
And Katana Master, that's just me ranting. Fluffy language like that is only to trip up people, and some teachers/professors do it on purpose. But I assume you're in highschool chemistry, so I see even less point in writing a bunch of fluff. Saying "In a solution of sulfuric acid in excess" would have been nicer.
It's cool

I was just lifting the question from this booklet I have.
I haven't done anything, just explained what to do. One sec, I'll double check with you.
EDIT: Close, but unless one of your numbers had only 1 significant figures, the answer should be 0.5039g, as the original mass of Mg had the lowest Sig. Figs. when I calculated it.
My steps:
no. of moles = 6.075/24.3 (24.3 being the gram formula mass of magnesium, I got the relative atomic mass from my data booklet) which equalled 0.25. Then using the 1:1 ratio I found the mass = 0.25 x 2 (2 being the gfm of hydrogen) equalling 0.5g