1. Can I travel to Sweden or Germany on 09/10/2011 by local flight and come back to france on 17/10/2011 to go back home.
It depends on your day of arrival in the Schengen area. If, as I presume, you arrived in France on the 3rd of September, you are allowed to stay 30 days from that date, which means you have to leave the Schengen area on the 2 October. So you are not allowed to travel to Sweden or Germany on 9th October
2. Do I have to return home when the duration of 30 days expires on 02/10/2011.