Complex sentence: Her paternal grandparents were Robert Keith, Master of Marischal and Lady Elizabeth Douglas, and her maternal grandparents were Sir Wiliam Keith and Janet Gray.
Split into simpler sentences: Her paternal grandparents were Robert Keith, Master of Marischal and Lady Elizabeth Douglas. Her maternal grandparents were Sir Wiliam Keith and Janet Gray.