Calling an algorithm

The algorithm AlgA in Listing 2 receives two numbers, labeled n1 and n2, and calls another algorithm, AlgB in Listing 1, to calculate a value based on the input.

Listing 1: Algorithm AlgB receiving a number labeled n as input.
Input: Number n
Output: A number

Start
  Output: n * n
End
Listing 2: Algorithm AlgA receiving two numbers labeled n1 and n2 as input and calling AlgB.
Input: Two numbers, n1 and n2
Output: A number

Start
  Set x to the output of AlgB with n1 as input
  Set y to the output of AlgB with n2 as input
  Output: x + y
End

Given the inputs n1 = 2 and n2 = 3, what is the output of AlgA? Select the correct output from the following options:

  1. 5
  2. 6
  3. 13
  4. 23