That is true 贵 means expensive, I think 您贵姓?is a kind of respect, and is okay to ask 您贵姓 for his last name, for example he will answer 我姓李/张 or 免贵姓李/张(few people will answer in 免贵姓X, because this is a very traditional answer). And is okay to ask 您姓什么?this is the fastest way. If you have any other questions, please feel free to ask me.