If I remember what you're trying to do....
Ext. 18 is going to get the overflow for Line 1 from Automated Attendant number 1, and is looped to Line 5
Ext. 17 is going to get the overflow for Line 2 from Automated Attendant number 2, and is looped to Line 4
For Ext. 18, Assign ONLY Line 1. For Ext. 17, Assign ONLY Line 2
#301-18-01-1
#301-18-02-2
#301-18-03-2
#301-18-04-2
#301-18-05-2
#301-17-01-2
#301-17-02-
3-press the Line 2 button
#301-17-03-2
#301-17-04-2
#301-17-05-2
Now in Centralized Telephone Programming, Ext. 18, only Line 1 will be assigned, change it to NO Ring. Ext. 17, only Line 2 will be assigned, set it to NO ring. These extensions will only ever ring when a call is transferred to them from the Automated Attendant.
For your Ext. 10, I'm going to suggest that you set up the buttons as shown in the picture below. Set Line 1 and 2 to Immediate Ring, assign Line 5 and 4 positioned as shown and set to NO ring, program the Auto Dial buttons above those, and
set Ext. 10's Auto Line Select to Intercom, Line 1, Line 2 so when you lift the handset you will be on Intercom, and the Auto Dial buttons will function straight away. To place outgoing calls, simply press Line 1 or Line 2 to get dial tone and call away.