Both cities are very doable from CPH. Trains go from the airport directly to Malmo via that new bridge, and the city itself is quite charming with the city center just a short walk from the train station. I think the ride to Malmo is just under an hour and the trains run frequently so you should have no problem. Copenhagen is similar, and the ride is even shorter, so it is up to you which city you'd like to visit. Just remember you'll need different currency for Malmo and Copenhagen, but ATM's are plentiful in both cities.