Which one got it right?

In my opinion, they're both the same.

Hyun Bin is a far better actor than the other leads though.

Both are bad. W was just a boring modern romantic cliche fairy tale. It had an interesting premise, but every other aspect of the show was so shallow and the story was overextended.

Alhambra is mostly the same. It has a very cool premise and technically it's a fantastic effort regarding sound and visuals, but the story drags too much, characters are not compelling and the romance aspect is absolutely unnecessary.

I do agree that the main lead is probably better than in W. And while W was dropped by me after few episodes, i at least want to see where the plot takes Alhambra. So i guess Alhambra is a bit better in my opinion.

If there is a need for some entertaining sci-fi/fantasy drama with a bit of romance, there is an older japanese drama Ando Lloyd. It's pretty cheesy and ridiculous, but it's much better paced and doesn't even try to mask its shortcomings, but mainly focuses on fun and action spectacle.
https://mydramalist.com/7942-ando-lloyd-a.i.-knows-love-

I dropped W: Two Worlds because I just couldn't watch any more twists I just gave up lol. I think the romance was good, the chemistry was certainly there but I don't even know where they are going anymore. I finished Memories of the Alhambra maybe because it was a proper game and there's a clear end goal (even though im not so sure if the ending was as clear as i thought it would be). I also felt super invested in Hyun Bin's character and Park Shinhye's brother. I loved the whole story on the brother and his friend and was rooting for park shin hye's family to be together again.

Both dramas have wonderful actors. But, both the dramas lacks justifying reason for their ending.

I watched both since, they have a different plot at least from what I saw...

But, they failed to give a reason or justification for why they happened...

In one scene, they gave some reason and show something and in another scene it differs to the principle they told. It's lacking to involve in those dramas.

well for me, both had a interesting start and kinda started to bore towards the end!!!
if i had choose between these two , i would choose Memories of Alhambra.
surely both doesn't have strong story... MOA was much better than W, Towards the end W made no sense at all, and it lagged like hell!

I like both actually. But In MOTA male lead did really great job but in W female lead plays the most crucial part. The irony is I like MOTA ending better eventho W undoubtedly ended with happy ending.

Both script are masterpiece. Not just the story but the way it's told. 

W use flashback into hypotethical flashback and dispatch that during episode 9 for example. So we follow the action but always a step back to the truth. Highly entertaining because we always want to know what happens and we get that at the exact point when this is the best time to know.

MOTA use a lot flashback too, during episode 13 (or 14 I don't remember). Deconstruted pace, following login in/login out of the game.

Both dramas have ultimate scene using Fantastic process to induce emotions + Double meaning cause and effect. Police station scene in W, hospital parking lot scene in MOTA. You can't get that in others dramas.

Overall, I prefer W. More fast paced, more crazy plot-twists and hidden logic behind. Even if the drama is not easy to understand during the last part, it's still more easy than last episode of MOTA, and also more consistent. You can make sens about most of what happened in the drama. 

W high concept is also more striking. Totaly absurd, but taking seriously the premice. Like stories of the Twilight Zone serie.

W for sure, I loved the fast paced action and twists from start to finish - this drama felt more memorable for me overall. 

I enjoyed the gaming parts of MOTA but the romance felt more forced there and story was kinda slow/meh.. plus the ending left us hanging with what happened to the ML. 

memories of alhambra is really great drama, high production value, great main actor! and acting, great cinematography, plot and it's dynamic, I loved everything!

W is much primitive for my taste, it's more rom com + fantasy, when MOA feels like sci fi drama. though W had good promise at list for ML as interesting character, it was ruined when he becomes just romantic bf....