Here's what I get
Planet Y travels 360 / 450 = 4/5 as fast as Planet X
So.....Planet X has traveled 360° in 360 days
And Planet Y has traveled (4/5) * 360° = 288° in 360 days
So there is a 72° difference between them
So it takes 360 / 72 = 5 360 day periods before they are on the same line again
Planet Z travels 360 / 540 = 2/3 as fast as Planet X
Planet Z travels (2/3) 360 = 240° when Planet X travels 360°
So....there is a 120° difference between them
So...it takes 360 / 120 = 3 360 day periods before they are in the same line again
5 * 3 = 15 360 day periods = 5400 days