Olá! Não participei do curso mas acho que uma solução usando o LINQ pode ser esta:
public record BankAccount(int Agency, int Number);
[Fact]
public void ByteBank()
{
var accounts = new List<BankAccount>()
{
new BankAccount(1, 1),
new BankAccount(1, 3),
new BankAccount(1, 2),
new BankAccount(2, 2),
new BankAccount(2, 1),
};
var sortedAccounts = (from ac in accounts orderby ac.Agency, ac.Number select ac).ToArray();
sortedAccounts[1].Agency.Should().Be(1);
sortedAccounts[1].Number.Should().Be(2);
sortedAccounts[3].Agency.Should().Be(2);
sortedAccounts[3].Number.Should().Be(1);
}