For those travelling from Bengaluru ( Bangalore ) to Mangaluru ( Mangalore ) in AC class, it makes sense that you book your tickets on 16517 as the AC coach of 16517 AB1 ( It's a combination of 3-tier and 2 tier AC ) is nearer from the second entrance as compared to the AC coach of 16523. Similarly those travelling in Sleeper Coach, I would suggest you book your berths in ES4 as that's the closest, in case it's not available in the said coach the order of the preferred coaches would be ES3, ES2 & ES1.