Sure...and keep in mind that a lot of these permutations problems work best when you at least draw out a few situations to get a feel for what they'll look like. If we call the other students A, B, and C, we could have seating arrangements:
Bob, A, B, C, Lisa (that's okay)
Bob, A, Lisa, B, C (not okay - Lisa is next to two others)
Bob, Lisa, A, B, C (also not okay - Bob is next two only one but Lisa is again between two)
A, Bob, Lisa, B, C (also not okay - both are next to two students)
So in order for each of them to only sit next to one of the other FOUR students (which for Bob includes Lisa as one of the other four and vice versa) they can only sit at the ends.
If we didn't count each other for them, and then said "could sit next to only one of the other THREE", then that last situation in which they sit next to each other would still work, because they'd each only sit next to one of the unnamed other three, but the way that this question is worded they can only sit at the ends.