Controlling motor with potential on 2 points
You can use a comparator, along these lines:







simulate this circuit &ndash; Schematic created using CircuitLab

The noninverting input sees the higher of your sample points minus a diode drop. It will see about 4.3V if either In1 or In2 is 5V, or about 2V if both are 2.7V.

The divider formed by R1 and R2 sets your threshold for turning the motor on. You should design this divider with the values in the previous paragraph in mind.

R3 adds some hysteresis for stability. You can google information about calculating this value based on your required noise margin.

R5 is a pullup needed if you use a comparator with an open drain output.

M1 just represents a generic drive for your motor, since you didn't say what you were using.