If a person is mujnib and if he performs ghusal then fajar prayer would get qaza. would it be ok to offer prayer with tayammum?

yes he or she shuld take the tayammum