see attachment
distance from ice cream to your house=distance from ice cream to friend+distance from friend to your house
distance from ice cream to your house=12
distance from ice cream to friend=?
distance from friend to your house=3
12=?+3
minus 3 both sides
12-3=?+3-3
9=?+0
9=?
answer is 9 miles