"I don't know how to reply to his text."
My understanding is that 怎么样 (how?), is a question word. If that's correct, how does the listener know that this is a statement and not a question? Would 如何 be a better fit e.g. 我不知道如何回复他的短信, or is just contextual?
Much like English sentences, which can sometimes include 5 W's or 1 H, Chinese sentences can contain words that suggest a question or uncertainty. As long as the listener or reader understands the given sentence/question, there won't be a problem deciphering it.
The sentence you suggested also has the correct literal translation. Even though 如何, 怎么样 and 怎么 are all interchangeable, they have slightly different usages and different aspects from translators.
- 如何 commonly appears in writing since it is more formal. That indicator is the machine's favorite compound vocabulary to use.
- 怎么样/怎么 is commonly used in conversations.