First equation
1) Write the balanced equation
Ca(s)+MgSO4(AQ)->CaSO4(aq)+Mg
2) Write the ionic equatin showing the oxidation states (charges), next to each ion
Ca (0) + Mg (2+) + SO4 (2-) ---> Ca (2+) + SO4 (2-) + Mg (0)
3) Remove the spectator ions (those that appear exactly the same at both sides). In this case remove SO4 (2-) from both sides to get:
Net ionic equation
Ca(0) + Mg(2+) ---> Ca(2+) + Mg(0)
Now go with the second equation
1) Write the balanced equation
BaCl2(aq)+K2SO4(aq)->BaSO4(s)+2KCl
2) Write the ionic equation
Ba (2+) + 2Cl (1-) + 2K (1+) +SO4 (2-) ---> Ba(2+) + SO4 (2-) + 2 K(1+) + 2Cl(1-)
3) Remove the spectator ions.
Here all the ions are spectator, because non of them changed the oxidation state. Then, there is not net ionic equation.