Ok it does look like your diagram should do that. So your problem is "level1 approved successfully and level2 rejected the task, then task again will go to level1 it is not happened thorugh Spring with activiti"
So level1 is working as you would expect and using the outcome to decide the next step but level2 is not? What conditions do you have set on the outgoing sequence flows and what variable are you using for the condition in the xml of your process definition? I'd recommend looking at Getting started with Activiti and Spring Boot and how that example sets the "telephoneInterviewOutcomevariable as the exclusive gateway uses it to route the execution"
It doesn't really matter whether it is going forward or backward. The question is whether the value of the variable that is being checked in the sequence flow matches the condition. Anything you could share of the xml and java would help.
What is the condition you are checking for both the outgoing transactions of second exclusivegateway (i.e after the Accountant Approval). If you could share the .bpmn file it will give clear idea of what you are missing.
Your diagram seems to be fine, what you are missing here is are you setting the variable properly and the condition check on outgoing sequence flow.