Mobility and Cost Aware Inference Accelerating Algorithm for Edge Intelligence