Answer
Ferdinand's participation in the Siege of Tangier was primarily motivated by his desire to support his brother, King Afonso V of Portugal. Ferdinand, as the Duke of Viseu, was a loyal subject and supporter of his brother's military campaigns, and he saw the Siege of Tangier as an opportunity to demonstrate his allegiance and contribute to the Portuguese conquest of North Africa.