@Donutlie because "like", or suki (好き) can be said by itself in Japanese, and with an ambiguous subject, he can easily assume she confessed to him (not like he will tho)
in this context, the solitary "like" can mean "I like you"
sorry if the explanation isn't clear