Moving washer machine 7 feet from trap
It depends on 1) how high your washing machine pump can eject water and 2) how high your existing drain already is. You have to be especially cautious with upright (non-high efficiency) washers as they dump a lot of water very quickly with each cycle and this can overwhelm a slow drain even if it meets code. 

In the worst case scenario, you’ll need a gray water pump to help pump the wastewater out to the drain location. Any plumber should be able to help you with that. 

Note that your dryer will also have a maximum distance, height, and number of air ducting bends that its vent motor can handle.