.
In this problem, the order of persons at given positions is IMPORTANT:
John as the President and Alice as the Treasurer is not the same as Alice as the President and John as the Treasurer.
Therefore, the answer in this problem is 30*29 = 870.
There are 30 choices to select a President from a pool of 30 students, and 29 choices to select a Treasurer among remaining 29 students.
This problem is NOT ABOUT COMBINATIONS - IT IS ABOUT PERMUTATIONS.
It is always so, when the problem says about selections to distinguishable named positions.
Solved.
------------------------
On Combinations and Permutations, see the lessons
- Introduction to Permutations
- PROOF of the formula on the number of Permutations
- Problems on Permutations
- Introduction to Combinations
- PROOF of the formula on the number of Combinations
- Problems on Combinations
- OVERVIEW of lessons on Permutations and Combinations
in this site. // I listed here the "introductory" lessons only . . .
Also, you have this free of charge online textbook in ALGEBRA-II in this site
- ALGEBRA-II - YOUR ONLINE TEXTBOOK.
The referred lessons are the part of this online textbook under the topic "Combinatorics: Combinations and permutations".
Save the link to this textbook together with its description
Free of charge online textbook in ALGEBRA-II
https://www.algebra.com/algebra/homework/complex/ALGEBRA-II-YOUR-ONLINE-TEXTBOOK.lesson
into your archive and use when it is needed.
/\/\/\/\/\/\/\/\
Be aware : the answer by @rothauserc is INCORRECT !
It is why I wrote my post !