I've recently begun studying openings, and I've been practicing the Ruy Lopez.
I played a game that began as follows.
[FEN ""] 1. e4 e5 2. Nf3 Nc6 3. Bb5 d5 4. O-O dxe4 5. Nxe5 Qd5 6. Bxc6+ bxc6 7. Ng4
Generally the black response is 3... a6, and then I can either play the exchange variation or back up my bishop to Ba4. Instead, as seen, they played 3... d5. I responded by ignoring the threat to my pawn by castling. After 5... Qd5, I decided to make the exchange and backed up my knight.
Did I respond correctly? Is there a named variation for that black response? If anything it was enough to throw me off. A few moves later I traded queens and forked his king and rook, but I can't tell if my advantage came from a bad move by my opponent or as a result of his atypical opening leaving him in a disadvantaged situation.