To answer the big questions: yes, you can make a game engine with a game engine, and yes, you can sell it for money rather than giving it away for free.
Building on an engine that already exists can often make the process a lot easier than starting from scratch, which is why many creators choose this route. Just be sure to check the licensing terms of any engine you build upon, since giving proper credit or meeting other conditions may be required depending on the tool.