Answer
The distance from Madrid to Bangkok is 6337 miles.
Work Step by Step
Let $d$ be the distance from Madrid to Bangkok.
The distance from Melbourne to Cairo is $d+2338$.
$d+(d+2338)=15012$ $\longrightarrow$combine like terms
$2d+2338=15012$ $\longrightarrow$addition property
$2d+2338-2338=15012-2338$ $\longrightarrow$simplify
$2d=12674$ $\longrightarrow$multiplication property
$2d\div2=12674\div2$ $\longrightarrow$simplify
$d=6337$