To know something "inside out" or "inside and out"?
I expect that the original phrase was inside and out. It refers to knowing all the parts of something (both its inner workings and its outside appearance).
However, inside out is a more common phrase, meaning an object whose insides and outsides have been reversed. Speakers may have shortened the above phrase to this one that they're more familiar with, even though it makes no literal sense for the above meaning.
According to Merriam-Webster, "inside out" implies that something is turned inside out, like an article of clothing. This is a literal sense. Additional definitions are more figurative, "knowing someone inside out" is to know them thoroughly.
"inside and out" is in Merriam Websters abridged dictionary, and is therefore not available online. It does cite "inside out."
"Inside and out" can mean simply the inside and the outside. "Inside out" implies a turning inside out, to put it extremely, a disemboweling, decomposing, or undoing.
As a native British speaker of English, I can only attest to knowing something "inside out." The alternative variation does sound rather strange but that, I'm afraid, is a personal view.
American (Midwest) here: I've always said and heard "inside and out"--except when it's been "backward/s and forward/s" (or the latter's reverse). It's something about the rhythm.