The question asks which person was commanded to sacrifice his son as a test from Allah. However, there is an important distinction to make: the person commanded to perform the sacrifice was Prophet Ibrahim (AS), not one of his sons. The question's options list only the sons, not Ibrahim himself.
In the Qur'an (Surah As-Saffat, 37:102-107), Allah tested Ibrahim (AS) by commanding him in a dream to sacrifice his son. When Ibrahim and his son both submitted to Allah's will, Allah ransomed the son with a great sacrifice (a ram), demonstrating that the test was about obedience, not the actual taking of a life.
Among the options given, the question appears to be asking which son was the one to be sacrificed. In mainstream Islamic scholarship, the son whom Ibrahim was commanded to sacrifice was Isma'il (AS). This is the predominant view based on the Qur'anic narrative in Surah As-Saffat, where the story of the sacrifice appears in the context of Isma'il's birth narrative, and the birth of Ishaq is mentioned separately afterwards as additional glad tidings.
Yusuf (AS) was the son of Yaqub, not Ibrahim, and is known for the story of being cast into a well by his brothers. Yaqub (AS) was the son of Ishaq and grandson of Ibrahim. Ishaq (AS) was Ibrahim's second son through Sarah, and while a minority of scholars hold he was the sacrificial son, the majority position identifies Isma'il.