Space robots have a wide application prospect in the aerospace industry. Due to the limited fuel for the space robots, which cannot support the space robots to run for a long time. In addition, the special working environment makes it impossible to replenish the fuel for the robot at any time. Therefore, a proper path is crucial for the operation of space robots. In order to ensure the operation of space robots, we optimize the allocation of exploration tasks and the selection of space robot paths, jointly. We propose two combination algorithms named Parallel Search and Task Allocation (PS-TA) and Subbranch Insertion and Task Allocation (SI-TA) to optimize the path and the task allocation , intend to obtain the minimum completion latency. We also construct Random Path Planning and Task Allocation (RTA) as the baseline. At last, we provide extensive experiments to demonstrate that proposed algorithms can obtain lower completion latency compared with RTA. Furthermore, SI-TA is more energy-efficient than PS-TA.