All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It seems, and Allaah Knows best, that you have not broken your oath when you told your friend's brother about the secret, with which your friend entrusted you and asked you to swear not to disclose it, as long as your friend, who made you take that oath, has given you his consent to disclose the secret to his elder brother. The reason for which he asked you to take the oath no longer exists with regards to your friend's brother only.
Therefore, when you told your friend's brother about that secret, you did not break your oath. In fact, this is what some Muslim jurists call "Bisaat" (context of an oath), by virtue of which the person who demands from someone to take an oath can modify or even cancel his intention regarding that oath.
Allaah Knows best.