These verses are about a ceasefire treaty or non-aggression pact. This is called هدنة or مهادنة or معاهدة etc. in Islamic jurisprudence. This is when the enemy is not subdued, but rather the Muslims agree to make peace with the disbelievers on equal or even unfavorable terms. It is one of the ways in which war can be terminated in Islamic law, the other ones being through imposition of Jizya or acceptance of Islam by the enemy.
The following conditions apply to it:
- Making such a truce is permissible but not obligatory for the Muslims.
- It is permissible only when there is a need or when there is an interest served by it, such as when the Muslims are weak.
- It is permissible only for a temporary period of time.
This is what the verses convey, 8:61 makes it permissible when necessary and 47:35 forbids it otherwise. Other similar reconciliations through different paths have also been given, such as:
8:61 is specific to when there is a need or interest served, while 47:35 is the general case.
8:61 is abrogated by the verses of Surah at-Tawbah (9:5, 9:29) which command fighting the People of the book until they pay Jizya and the Arab polytheists until they accept Islam. It is known that at-Tawbah was among the last Surahs to be revealed and that it abrogated every previous verse which had prescribed patience or restraint against the enemy.
'Peace' is used in different meanings in the two verses. In 8:61 it means a treaty whereby the enemy agrees to pay Jizya. While in 47:35 it means a truce in the absence of Jizya.
Ref:
واختلف العلماء في حكمها، فقيل: إنها ناسخة لقوله تعالى:" وإن جنحوا للسلم فاجنح لها" «٢» [الأنفال: ٦١]، لأن الله تعالى منع من الميل إلى الصلح إذا لم يكن بالمسلمين حاجة إلى الصلح. وقيل: منسوخة بقوله تعالى:" وإن جنحوا للسلم فاجنح لها". وقيل: هي محكمة. والآيتان نزلتا في وقتين مختلفي الحال. وقيل: إن قوله" وإن جنحوا للسلم فاجنح لها" مخصوص في قوم بأعيانهم، والأخرى عامة. فلا يجوز مهادنة الكفار إلا عند الضرورة، وذلك إذا عجزنا عن مقاومتهم لضعف المسلمين.
— Tafsir al-Qurtubi
وقد اختلف في هذه الآية، هل هي منسوخة أم لا. فقال قتادة وعكرمة: نسخها" فاقتلوا المشركين حيث وجدتموهم" «٥» [التوبة: ٥]." وقاتلوا المشركين كافة" [التوبة: ٣٦] وقالا: نسخت براءة كل موادعة، حتى يقولوا لا إله إلا الله. ابن عباس: الناسخ لها" فلا تهنوا وتدعوا إلى السلم" «١» [محمد: ٣٥]. وقيل: ليست بمنسوخة، بل أراد قبول الجزية من أهل الجزية.
— Tafsir al-Qurtubi
Two translated fiqh sources which detail the laws on truce can be seen in Reliance of the traveler,page 604 to 605 and Bidayat al-Mujtahid: The Distinguished Jurist's Primer , page 463 to 464.