If a sample contains 25g of carbon14 and 75g of nitrogen14, how many half lives has it undergone

N = No/2^x.

We have 25 g C14 remaining. It started at 100 g total (25 g C14 + 75 g N14 decay product = 100 g total).
25 = 100/2^x or 2^x (25)= 100.
2^x= 4 or x = 2 half lives.
You can do it by trial like this also.
Start with 100 g so after 1 half life you will have 50 g left and after another half life you will have 25 left. So two half lives elapsed.