Why are there two answers to this problem ? Even though methods are same 5 students are selected to participate in 3 events, such that at least one student participates in each event. In how many ways can the students participate? 
1st method :(Textbook explanation link)
This gives a sum total of 150 ways.
2nd method :


*

*Select 3 students : 5C3

*Number of ways they can select the competitions : 3!

*The rest of 2 students, each have 3 competitions to select 
independently : 3 x 3 


This gives a sum total of 540(10 x 6 x 9) ways.
The textbook answer is 150.
 A: You are double counting many ways.  When you select the first three, call them ABC and let A do the first event.  Then D could also do the first event.  You would also count picking DBC at first, assigning D to the first event, then having A do the first event separately.
A: Maximum possible cases is $3^5$=243. So obviously 540 is wrong.
Now problem with your approach is that there is double counting. A lot of double counting.
Let students be A,B,C,D,E. 
Now you first choose 3 students. Then you give independent choices to other students.
So let us say that initially 3 students you choose were A,B,C and then finally distribution was (A,D),(B,E)and (C) in 3 different groups.
Now in second case assume that you chose D,E,C and final distribution was (D,A),(E,B) and (C).
These two cases are same in your approach and hence double counting.
Use principle of inclusion exclusion to get answer 
ie $3^5 - 3C1 * 2^5 + 3C2 * 1^5 $ = 150
A: Your method counts those assignments in which more than one student is assigned to the same event multiple times.
Either three students are assigned to one event and one student each is assigned to each of the other events or two students each are assigned to two events and one student is assigned to the other event.
Three students are assigned to one event and one student each is assigned to the other two events: There are $3$ ways to choose which event receives three students, $\binom{5}{3}$ ways to assign three of the five students to that event, and $2!$ ways to assign the remaining two students to the other two events.  Hence, there are $$\binom{3}{1}\binom{5}{3}2!$$ assignments of this type.
Two students each are assigned to two events and the other student is assigned to the other event:  There are $3$ ways to choose which event will receive a single student, $5$ ways to choose which student will be assigned that event, and $\binom{4}{2}$ ways to choose which two of the remaining students will be assigned to the remaining event that appears first alphabetically.  Hence, there are $$\binom{3}{1}\binom{5}{1}\binom{4}{2}$$
assignments of this type.
Total:  Since these distributions are mutually exclusive and exhaustive, there are
$$\binom{3}{1}\binom{5}{3}2! + \binom{3}{1}\binom{5}{1}\binom{4}{2}$$ 
assignments in which at least one student is assigned to each event.
How did you over count?
You count distributions in which three students are assigned to one event and one student is assigned to each of the other events three times, once for each way you could have designated one of those three students as the one who is assigned to that event.  You count distributions in which two students each are assigned to two events and one student is assigned to the other event four times, once each for each of the two ways you could designate one of those two students as the student assigned to that event for each of the two events that receive two students.  Notice that 
$$3\binom{3}{1}\binom{5}{3}2! + 4\binom{3}{1}\binom{5}{1}\binom{4}{2} = 540$$ 
