Respuesta :
Yes, this sentence is technically written correctly. It's a little awkward in terms of form but there's nothing specifically wrong with it, since question marks go inside quotations.
Actually, this dialogue is incorrect because when a dialogue is happening, each time a new person speaks, a new paragraph has to be made. So I would say this dialogue is incorrect.