Combine first 3 ingredients in a bowl. Mash until smooth. Spoon into a lightly greased 11"x17" baking dish.
Stir together cranberries, apple, sugar and 1/4 cup water in a saucepan. Cook over medium heat for 8 to 10 minutes, or until cranberries burst. Add walnuts; stir well. Spoon over sweet potatoes in dish.
Combine brown sugar, remaining 2 tablespoons water and butter in a small saucepan. Bring to a boil; boil, stirring constantly, 2 minutes. Pour over cranberries and sweet potatoes. Bake, uncovered, at 350° for 15 minutes, or just until heated through.