How to connect two arduino board, one connect to keypad and one connect to lcd

Maybe start by making a plain keypad example work on one arduino, and a plain LCD example work on the other, and then consider what you want to communicate. Simplest would be to check the password on the keypad arduino and then send only a 1-bit LOCKED/UNLOCKED signal to the LCD arduino. If you want more features than that, you need to send more data, and it is much more complicated.

If you want the LCD Arduino to parse some serial and act, perhaps look into some of these erial communication and parsing examples: