I've spent significant time in both, but these days go to MEL a whole lot more. My opinion is this: I'd rather visit Sydney, but I'd rather live in Melbourne. Sydney, as mentioned, has all of the sights, the beauty, etc. Melbourne itself isn't necesarilly a beautiful city, but my gosh is it a great place to eat, drink and be merry. It's a foodie town with great food and great beer/wine bars. Sydney has that too, yes, but I prefer the ones in Melbourne - they're more laid back than flashy, like they are in Sydney (in my opinion).
4 days in MEL and 5 in SYD sounds great. Even 5 is more than enough in my opinion...even if you spend a whole day at, say, the zoo (which is great). Experience Melbourne - see the ethnic neighborhoods, walk the streets, visit the museums. Then go to Sydney and see the physical beauty.
(Yes, I know OP has traveled by now, but I am more commenting for others who may be interested and are searching).