The কুরআন explicitly provides the alternative of fasting for হাজীগণ who cannot afford the sacrifice: 'But whoever cannot find (a sacrificial animal) — then a fast of three days during হজ্জ and seven when you return home. That is ten complete days' (2:196). This alternative is available only when the হাজী genuinely cannot afford the sacrifice — not as an optional choice for those who have the means.
Sheikh Ibn Baz explained the timing of the three days during হজ্জ: the best time is to fast the 6th, 7th, and 8th of Dhul-Hijjah (after entering ইহরাম for হজ্জ but before the Day of আরাফাত). The হাজী should not fast on the Day of আরাফাত (9th), as নবী করীম মুস্তাহাব not fasting on that day for হাজীগণ at আরাফাত so they have strength for worship. If the হাজী could not fast before the 9th, the scholars differ on whether fasting on the days of Tashriq (11th, 12th, 13th) is permitted. Aisha and Ibn Umar narrated that fasting the days of Tashriq was permitted only for those who could not find a sacrifice, and Sheikh Ibn Uthaymeen accepted this position.
The seven days are fasted after the হাজী returns home. They do not need to be consecutive, though fasting them consecutively is preferable. If the হাজী delays the three days and was unable to fast them during হজ্জ, the majority of scholars hold they should still fast them (even after returning home), making a total of ten days fasted after হজ্জ. Al-Fawzan confirmed that the fasting alternative is only for those genuinely unable to afford the sacrifice, and if the হাজী later acquires the means, they should offer the sacrifice even if they already fasted.