Hello
If I change this load-balancing criteria as L4-based load balancing , do i need to carry that out on both the switches.
No, it is not required to have the same load balancing algoritm on both switches connected via a trunk. The switch is doing the load balancing only for outgoing traffic and every switch is doing it independently. Incoming traffic will be accepted on any member port even if it belongs to a steam whose outgoing traffic is sent out a different port. Keep in that a lot of switches supporting link-aggregation have only a single trunk load-balancing mode but they are still able to work with the more advanced switches offering different modes.
Also if i carry out L4-based load-balancing on both the switches, would any other trunk formed with Switch A (which is the core switch) be affected by it. In other words would that cause a mismatch in every other trunk that Switch A has.
In AOS-S (which are using both 5412R and 2930) you can specify the load-balancing only globally, not on a per trunk basis. That means that changing the load-balancing globally on a switch will change it for all configured trunks on this switch.