The upper cabin is re-extruded, using the newly made lower valance top profile.
The shape is fine up to the real top dome: the diagonal ridge must be removed.
I decided to keep only the lower bulk of the cabin, cutting out the really curved top and the back straight part. This allowed me to focus on the top curved shape.
I realized it intersecting two parts of ellipsoids. The ridge at their intersection can be easily smoothed with the “fillet” tool of FreeCAD.
This cap extends below the top of the cabin bulk, only the upper part is kept: a solid, shaped as a pyramid, with the faces sloping tangentially to the uppermost section of the bulk, is used to cut out the top cap.
The top and the bulk are properly matching at the sides. Extending the back face of both, the cabin shape is complete: only the spiky edge at the front of the bulk must be smoothed. This is easily done, cutting out the edge with a huge cone.
In the resulting shape there is no more mismatch between the top cap and the bulk. A fillet with a big radius on the cone-cutout right edge (in green in the picture), gives then the final shape. The back of the upper cabin is backwards extended horizontally to the required full length of the cabin.