The phrase you are referring to as incorrect is "how to talk to" not "how you talk".
Since you are not comparing like with like, your objection makes little sense. The point concerning the correctness of the phrase in isolation was simply that of infinitive construction vs. subordinate clause as postmodifier to the adjective 'careful' (i.e. you cannot *be careful how to do something) , irrespective of the presence or absence of 'to', whose position relates to a quite separate set of grammatical rules that are - or at least should be - the main focus of our discussion.
And by the way here are a couple of examples of stranded prepositions:
Which act did John leave the theater after?
Who did you destroy a picture of?
Yes, indeed they are, but we are dealing here with far more than a simple stranded preposition!
We have, at the risk of repeating myself, a clause (as it should be, see above) postmodifying an adjective, and the preposition simply cannot acceptably be 'stranded' after that, any more than it could be after the conditional clause of
*He is a man you should not talk if you meet him to.
(cf. possible:*He is a man you should not talk to if you meet him/ ...to whom you should not talk if you meet him).