I posted a question somewhere that said...
Can anyone tell me how I can solve this?
...but someone edited it to...
Can anyone tell me how can I solve this?
...and it was accepted.
That's wrong isn't it? Can someone explain how that's wrong?
The difference between the two versions is that the subordinate interrogative clause has NOT undergone subject-auxiliary inversion in the first version (#1), but it has in the second version (#2).
The expression "how I can solve this" in your example is a content clause, which in your example is a subordinate interrogative clause. In general, a subordinate interrogative clause does NOT normally undergo subject-auxiliary inversion (which it would have if it had been the matrix clause -- notice the subject-auxiliary inversion in your matrix clause "Can anyone tell me . . .").
In other words, your version was fine to begin with.
But you might want to be aware that in fiction prose (and in some informal styles of discourse), that sometimes a subordinate interrogative clause might undergo subject-auxiliary inversion. E.g. "I wanted to ask the stranger how was I to solve this with merely a flashlight and a metal spoon?" (Aside: We fiction writers tend to often do that in the belief that it keeps the reader in closer to the story of the narrative.) But doing this in a formal register would probably be seen as being a grammatical error (i.e. non-standard grammar).
MORE INFO (probably unrelated to OP's question):
Because the subordinate clause starts with the word "how", the interrogative clause might be ambiguous as to whether or not it could be, or could also be, an exclamative clause. (An exclamative clause: "How big you have become!") But in your case, due to the matrix clause, the subordinate clause seems to definitely be only an interrogative clause.
The word "how" is not really a relative word (except for rare or non-standard situations), and so, the subordinate clause would not be a relative clause. Though, you might be interested to know that the word "how" could sometimes be used in non-standard prose. For instance, in CGEL, page 1053:
Though, the examples that CGEL gives for the fused-relative construction using "how" seem to me to be okay: pages 1076-7,
Anyway, those examples are fused-relatives (which your example is not).
Note that CGEL is the 2002 reference grammar by Huddleston and Pullum et al., The Cambridge Grammar of the English Language.
ASIDE: I just noticed,
That's the same type of sentence as the one you are asking about, as you probably already know and probably did on purpose. :)
“Can anyone tell me how I can solve this?" should be correct because there is one question and one predicate subject inversion can anyone.
There's a distinction between:
Imho, the guy who corrected your original version would be right, had inserted a comma:
Can anyone tell me, how can I solve this <- 2ndary is more stand-alone, and would sound bad in the form like "Hi, how i can find the market?" It must be "how can i".
Without the comma, there is no secondary part in the sentence, and you are right. It must be "tell me how i can"... :-)
Your initial question was perfectly formed.
The revised question, though understandable, is not English as she is spoke, at least, not in the UK.
The revised question actually contains TWO questions: Can anyone + how can I? I get the sense this is a translation from a native language syntax into English.
This is very much a stand alone statement...
As you can see, the below statement does not work by itself...
You were right and your editor was wrong.
Your question was
and you properly expressed X as a free relative clause, which always acts as a nominal constituent. You asked, in effect, if anyone could tell you an answer.
Your editor inverted the auxiliary verb and the subject of the free relative clause, transforming it into a free-standing question. Your editor asked, in effect, if anyone could tell a question, which is not idiomatic English.