Atwood Machine Problem (Rotational Dynamics)

Two masses m1 and m2 are hung over a pulley, forming an Atwood Machine.

m1 = 0.400 kg

m2 = 0.410 kg

R, radius of pulley = 0.10 m

moment of inertia I of pulley = 5E-3 kgm^2.

a) When the distance between the two masses is 0.50 m, how fast is each moving?

b) At that time, how fast would each mass move if the pulley was considered massless?

Well for part a I thought that:

(m1)a = T - (m1)g

(m2)a = (m2)g - T

and just solve for a. Then from a you can find the speed when the mass has moved 0.25 m.

However I would have done the exact same thing for part b, and I didn't use moment of inertia here at all. So I'm sure this is wrong... any help?