Get last-child of breadcrumb and use .trim to manipulate URL
var areaname = $('h1.page-header').text(),
lookforstate = $('ol.breadcrumb li:last-child').text(),
trimstate = lookforstate.split(","),
resultstate = trimstate [trimstate.length-1],
getstate = $.trim(resultstate),
w = "/map-search-property?&state=",
x = "&district=";
result = w + getstate + x + areaname;
$('a#search-listing-area').attr('href', result);