The 22nd and 24th Presidents had the same biological mother and father, but weren’t brothers.
They were both male, and were never female.
Neither were adopted or “switched at birth”.
They were the same person. The 22nd President was Grover Cleveland. After his first term, Benjamin Harrison was voted into office. Once Harrison was voted out of office, Cleveland was voted back in, becoming the 23rd President.