Important characteristics of Skinner's (1957) definition a intraverbal:
General examples include: social formulae (How are you? / I am fine), word associations (cat / dog), and facts (two plus two equals? / four).
(The response to be analyzed is in bold text.)
The first item is not an example of a intraverbal. The speaker is Sammy. He did something (said "What is your name?") and his behavior produced a reinforcing consequence (being told he is incorrect). We classify his behavior as verbal because its reinforcing consequence was mediated by a listener (Janice). Also, his behavior was likely under the control of a verbal SD (Janice's auditory stimulus "What is your name?"). However, the relation between the SD and the response is one of point-to-point correspondence; that is, subdivisions of the auditory stimulus ("What" / "is" / "your" / "name?") controlled subdivisions of the response (say "What" / say "is" / say "your" / say "name?").
The second item is an example of a intraverbal. Again, the speaker is Sammy. He did something (said "Sammy") and his behavior produced a reinforcing consequence (being told he is correct). We classify his behavior as verbal because its reinforcing consequence was mediated by a listener (Janice). In this case, his behavior was likely under the control of a verbal SD (auditory stimulus "What is your name?") that does not have point-to-point correspondence with the response (say "Sammy"); these are the two defining features of an intraverbal.