2. The sum of both digits, of either of two two-digit numbers, in whatever order the digits are written, is 9. The square of either of the digits of either number, minus the product of both digits, plus the square of the other digit is the number 21. The numbers

To find the two two-digit numbers that satisfy the given conditions, we can use algebraic equations.

Let's assume the first two-digit number is represented as 10a + b, and the second two-digit number is represented as 10c + d, where a, b, c, and d are the digits of the numbers.

According to the first condition, the sum of both digits, regardless of the order they are written, is 9. This can be expressed as:

a + b = 9 -- (Equation 1)

Now, let's move on to the second condition. The square of either digit of either number, minus the product of both digits, plus the square of the other digit equals 21. This can be written as:

a^2 - ab + b^2 = 21 -- (Equation 2)

Now, we have two equations (Equation 1 and Equation 2) with two unknowns (a and b). We can solve these equations simultaneously.

Let's solve Equation 1 for a:
a = 9 - b

Substituting this value of a into Equation 2:
(9 - b)^2 - (9 - b)b + b^2 = 21

Expanding and simplifying this equation:
81 - 18b + b^2 - 9b + b^2 + b^2 = 21
3b^2 - 27b + 60 = 0

Next, we can solve this quadratic equation for b. We can factorize or use the quadratic formula to find the values of b.

Using the quadratic formula: b = (-(-27) ± √((-27)^2 - 4 * 3 * 60)) / (2 * 3)
Simplifying further: b = (27 ± √(729 - 720)) / 6
b = (27 ± √9) / 6
b = (27 ± 3) / 6

Solving for b, we get two possible values: b = 5 or b = 4.

Now, let's substitute these values of b back into Equation 1 to find the corresponding values of a:
For b = 5: a = 9 - 5 = 4
For b = 4: a = 9 - 4 = 5

So, we have found two possible pairs of digits: (4, 5) and (5, 4).

To find the two two-digit numbers, we can substitute these values into the earlier representation: 10a + b, and 10c + d.

For the pair (4, 5):
First two-digit number = 10 * 4 + 5 = 45
Second two-digit number = 10 * 5 + 4 = 54

For the pair (5, 4):
First two-digit number = 10 * 5 + 4 = 54
Second two-digit number = 10 * 4 + 5 = 45

Therefore, the two two-digit numbers that satisfy the given conditions are 45 and 54.