You have a couple of options to create this, but for sure using condintional visibility on the detail & edit page section is necessary.
You can use helper booleans to determine if the search is being done. If so show the detail page with conditional visibility.
Instead of helper booleans you could also set an association with the searched objects, if this assocation is not empty you can show the detail page.
Hope this helps.
Showing search fields and and edit fields in one page will be difficult, i don't think you can in Mendix. I also think the navigation of this would be a bit awkward to the user: what if you are in the middle of making changes in the edit-part and then decide to do a new search? What will you do with the uncommitted changes?
In my experience it really pays out in Mendix to stick with a pattern like this:
I hope this helps.