You're welcome to cook the egg as long as you like, I like my eggs fried medium.
First make a meat pattie and season to your choosing, it helps to make a pattie somewhat thin so it will cook fairly quickly.
Then take a cup and with it's top use it as a cookie cutter to remove the center of the pattie.
Then add the pattie to the skillet and begin to cook. After a few minutes go ahead and add the egg to the center.
Cook the pattie about 3/4 of the way through then flip, be sure to flip quick so the egg yolk stays in the middle.
Then top it with your favorite cheese to finish cooking and serve with whatever you so please.