You need:
$(".first.last").text()
instead of:
$(".first .last").text()
You don't need any space here since space indicate the descendant elements. So your current selector will select any descendant with class last
inside any element with class first
.