The two power sources aren't in series (wrong, see later in post) so don't add together. When the input is 6V then a current will flow through the resistor and charge the battery. Actually, just realised the battery is in "backwards" - negative up. However, all this means is when 6V is the input then 6+4.5V will be dropped across the resistor and the battery will be (slightly) discharged - the output will still be 6V. When the input is -6V then the output will all come from the battery so will be -4.5V.
Mike.
Edit, just noticed in the textbook answer they work out the current through the resistor (and diode) by using 10.5/10000.