The novel revealed Superman to be brilliant. Lex lost his hair in a science accident. Lex journeyed into space in a spaceship whilst Superman flew beside him.
Sounds like the Elliott S Magin novel Last Son of Krypton. From Wikipedia:
Lex is a childhood classmate of Clark Kent in Smallville, a scientific genius who blames the then-Superboy for ruining his greatest experiment—the creation of artificial life (in fact it is Lex, celebrating his achievement with a smoke, who starts the fire in his lab). It is at this time that his hair is also burned off. Lex is never again able to replicate his results and holds a lifelong grudge against Superman as a result.
Lex as an adult spends much of his time in prison, but in this story it is described as largely by choice; Lex has the capacity to escape nearly at his leisure, but finds that solitude gives him time to work on his scientific theories and finds dodging manhunts tedious. He learns of a secret document written by his idol Albert Einstein, and breaks out for the express purpose of stealing it, using a hologram of himself as a distraction; however, when he cannot translate it (it is actually written in Kryptonese), turns to an expert linguist who turns out to be a disguised alien who also wishes to steal the documents. Luthor then forms a reluctant alliance with his archenemy Superman to chase the alien to a distant world, using Lex's one-man faster than light starship which he has kept hidden for years in plain sight as a modern art sculpture. When the mysterious alien's greater plans are revealed, Lex must work with, and even save the life of, Superman in order to protect the entire galaxy from the would-be warlord.