Answer:

Step-by-step explanation:
Hello!
In this case, since the writing of a net ionic equation first implies writing the complete molecular equation:

We can see that HCl and MgCl2 are ionized because they are aqueous, thus we write:

In such a way, we can cancel out the chloride ions as they are the spectator ones to obtain the net ionic one:

Best regards!