Here's my theory:
There are always 2 timelines for 1985 (Not including the other 1985 created by 2015 Biff)
There are 1985A and 1985B which have MartyA and MartyB respectively.
MartyA is in 1985A and is speaking to DocA on the phone and DocA tells him to go to TwinPines Mall.
DocA has no memory of meeting MartyA in 1985A as it never happened.
DocA is shot by Libyans and dies.
MartyB runs up to the TwinPines Mall sign and sees DocA get shot.
MartyA gets in the Deloreon and goes back to 1955.
Whilst MartyA is in 1955 he changes the timeline and therefore creates 1955B which leads to 1985B.
MartyA gives DocB the letter explaining what happens in 1985A.
MartyA returns to 1985B and sees DocB get shot.
MartyB leaves 1985B.
MartyA sees that DocB is alive due to the letter that MartyA gave him in 1955B.
MartyB is in 1985B and is speaking to DocB on the phone and DocB tells him to go to LonePine Mall.
DocB remembers meeting MartyA in 1955B but doesn't tell MartyB that this happened.
MartyB arrives at LonePine Mall and is given extra plutonium by DocB and is told that if he ever gets stuck in the past, to use that to come back to 1985 IMMEDIATELY.
MartyB doesn't really understand what DocB means but goes with it.
DocB is shot by Libyans but is wearing a bulletproof vest and survives but stays lying on the ground acting dead.
MartyA runs up to the LonePines Mall sign and sees DocB get shot.
MartyB gets in the Deloreon and goes back to 1955A.
MartyB arrives in 1955A and from listening to what DocB told him, he uses the extra plutonium and goes directly back to 1985A.
MartyB, by not changing the timeline from its natural course, re-creates 1955A which leads to 1985A.
MartyB returns to 1985A to try to save DocA from being shot.
MartyA leaves 1985A
MartyB sees that DocA is dead as he didn't arrive in time to warn him.
So basically each of them creates the other timeline. One by changing the natural timeline and one by not changing it which still changes it...