What can only be termed "magical thinking" permits Oedipus to connect the murder of Laius, with the state of kingdom at the outset of the play?

In response to the Thebans lamenting and prayers because of the famine and plague, Oedipus sends Creon to the Oracle at Delphi. Creon reports back that the gods have unleashed a plague in reaction to the murder of the previous King Laius (Oedipus' father and Jocastas first husband). If by magical thinking, you mean: finding causation where there may only be correlation or coincidence, then Oedipus links the murder to the state of the kingdom...

In response to the Thebans lamenting and prayers because of the famine and plague, Oedipus sends Creon to the Oracle at Delphi. Creon reports back that the gods have unleashed a plague in reaction to the murder of the previous King Laius (Oedipus' father and Jocastas first husband). If by magical thinking, you mean: finding causation where there may only be correlation or coincidence, then Oedipus links the murder to the state of the kingdom as evidence of growing unrest and crime in the face of famine and plague.

If by magical thinking, you mean having a mental affect or control over nature, then perhaps he is thinking that by finding the murderer, or by solving the kingdom's problems, other problems will fade as well. (This is probably more along the lines of appeasing the Gods, so it's only an indirect way of saying Oedipus believing he can alter the outside world).

There is also the idea of synchronicity, that certain things are synchronic (happening at the same time, and perhaps connected). Oedipus may believe that the murder and plague, famine, etc. are directly related (phenomenally or by the will of the gods); and therefore, if he can rid the kingdom of one problem, the others will go away - not necessarily because they are causally related, but because they are similar: thematically, metonymically, etc.