How do I stop item removing from list?

Hello i have this code to remove item in 1st script.

public void RemoveFromInventory()
{
    Inventory.instance.Remove(this);
}

And i have this code to add item in 2nd script

public void Equip(Equipment newItem, ItemType2 itemType)
{
    Equipment oldItem = null;
    if (itemType == ItemType2.laser)
    {
        if (lasers.Count < 2)
        {
            lasers.Add(newItem);
        }
        //addToArray(newItem);
        //lasers.Add(newItem);
        //Debug.Log("Laser added");
    }
    if (itemType == ItemType2.engine)
    {
        if (engines.Count < 2)
        {
            engines.Add(newItem);
        }
        //engines.Add(newItem);
        //Debug.Log("Engine added");
    }
    if (onEquipmentChanged != null)
    {
        onEquipmentChanged.Invoke(newItem, oldItem);
    }
}

How do i make that if item wasn’t equipped, due to list size limited to 2, so item doesn’t removed from inventory?

Nvm i found another solution

    public void AddBack()
    {
        Equipment oldItem = null;
        if (lasers.Count == 2)
        {
            inventory.Add(oldItem);
        }
        oldItem = null;
    }

Like this

    public void RemoveFromInventory()
    {
        if (equipmentManger.IsEquipped == true)
        {
            Inventory.instance.Remove(this);
        }
    }

But where do i put IsEquipped bool inside first script?