Just a warning that I may have got Hobbes and Locke a bit muddled up, as it has been years since I studied them. And naturally it was Hobbes who influenced Locke, as Hobbes was an old man when Locke was a young man.
It is curious to me that both had their thoughts somewhat muddled by religion, Locke more so than Hobbes. I think Hobbes today would be an atheist, and if I recall correctly, he was even accused of such in his lifetime. I'm not sure the meaning was quite the same in those days. Anyway, it was a time when any prominent person who strayed too far from conventional religious practice and beliefs would be putting their freedom, and perhaps even their life, in jeopardy. We still have many today whose thinking gets all muddled up by religion. Will we ever be free of it? Not certainly in my generation. At least the cutting of tongues, drowning, and burning at stakes has largely abated within the Christian sects.