Will it be okay if I will use motor shield, which uses pins 13, 12, 10 for motor a, and 11, 8, 9 for motor b.
And my lcd uses pins 2, 3, 4, 5, 6, 7 (10). 10 pin for backlit. But when I will program these shields, I won't declare lcd shield pin 10, pin 10 will be motor a brake.
If you don't declare pin 10 in the LCD configuration then the LCD library won't use pin 10 but if it's still connected to the LCD backlight and the motor shield then it may
effect the backlight and/or motor break when used for breaking. You could try it and see but this could damage something so be careful. I assume pin 10 is used for backlight as it's a PWM pin so the backlight can be dimmed or turned off. You could just move it to another pin or save the pin and make it so the backlight is always on.