I am doing homework, and I do not understand an answer the text is giving me. I know the answer is correct, but I do not understand how they get it using permutations.

Question: How many ordered pairs can be formed from set A without allowing the first number to be the same as the second number? (set A is: {2,3,4,5,7})

My answer:

Since there are 25 ordered pairs that can be formed from this set n(A x A) = 25. I just subtract 5 from that because there are 5 ordered pairs that use the same number. So 20.

Texts answer:

P (5,2) = 20

I do not understand how they get this answer. Can someone explain it for me? I have been racking my brains for a while now and do not understand how to get it.

The next question in the text is very similar, so it would be great if I understood how to do it, as seeing things alot usually means it will be on the exam!