Frame around the duct, its a lot easier. You can just run the top plate
up to the duct, then continue it on the other side. Its being screwed
to the ceiling joists anyway. As far as the clearances for the furnace,
usually the furnace installation instructions have the minimum
clearances around a furnace. But keep in mind what kind of access you
need if you have to service it. You said one of your walls is 5 feet
away, which is plenty.