how will i know if the given formula is an element, compound or mixture?

If it is an element it will be listed on the periodic table. If it is a mixture you will be able to separate it by physical means. It is isn't an element and it isn't a mixture, it must be a compound.