How would you do this sort of problem in general, for example, if the the letter sequence was longer and there were more conditions?
One way I used to solve this problem was to enumerate the possibilities (I counted 14):
L => PLAY, PLYA / P \ A = > PALY, PLYA P => LPAY, LPYA / L \ A => LAYP, LAPY P => YPLA, YPAL / Y -- L => YLPA, YLAP \ A => YAPL, YALP
The other way I tried to think about this was to start with all possible combinations of the letters and subtract out letter combinations that didn't meet the given conditions.
4! - 3! if you start with A - 2 x 1 * 1 * 2 if you start with P or L but have Y as the second letter.
It would seem if you make the problem larger and add more conditions it becomes error prone to try to subtract out all the unacceptable combinations of letters.