Simple problem for anyone who knows what he is doing

I’m stuck on a problem involving a cord that has mass. I know how to do problems where the cord's mass is 0 but ones the factor of the cords mass is introduced I’m lost.

I’m stuck on the following problem:

A block (mass m1) on a smooth horizontal surface, connected by a cord that passes over a pulley to a second block (mass m2), which hangs vertically.

Determine a formula for the acceleration of the system if the cord has non-negligible mass mc specify in terms of L1 and L2 the lengths of cord from the respective masses to the pulley (total cord length L =L1+L2)

I think what you need to do is note that the cord has total length L= L1+ L2 and so has "linear density" mc/L= mc/(L1+ L2). That means the mass of the cord hanging vertically is
mc(L2/(L1+ L2))= mc(L2/L). That gives precisely the answer given.

From that you can calculate the total mass hanging down and total of all mass.

I thought you said you could do it if the cord was massless- once you know how to calculate the mass of each part of the cord, include that into the masses m1 and m2 and the rest of the problem is exactly as if the cord was massless.

The total mass "hanging down" is m2+ mc(L2/L). The downward pull is it's weight: (m2+ mc(L2/L)g. But that force (weight) has to accelerate the entire mass: m1+ m2+ mc. Using F= ma we have