Assuming that the domain attribute is not set on the cookie in question, in this scenario it is indeed a third-party cookie due to the hostnames being different. However browsers who would ordinarily block third-party cookies will not block it due to the base domains being the same. So in that respect it is not treated as a third-party cookie.
I know this because I was able to successfully set and read a third party cookie when the base domain was the same and the subdomain was different while third party cookies were blocked in the latest versions of Firefox, Chrome, and Microsoft Edge's browser settings. This was true even when no domain attribute was set on the cookie. This means that Firefox, Chrome, and Microsoft Edge do not consider cookies from the same base domain to be third party cookies.
My methodology was as follows. I have two different hostnames with the same base domain but different subdomains. One of them contains two PHP files. The first sets a cookie with a random cookie name and no domain attribute and returns the name of the cookie as JSONP. The second attempts to read the cookie and then returns either true or false as JSONP. The other hostname contains an HTML file that uses AJAX to query the first PHP file that sets the cookie, and then when done, immediately uses AJAX again to query the second PHP file that tests for the existence of the cookie. I first made sure that third party cookies were being blocked by the browser before moving forward. I tested three browsers: Firefox, Chrome and Microsoft Edge. In all cases the results showed that the cookie was successfully set and read even though the cookie was from a different domain as long as the base domains were the same.
Conclusion: if a resource sets a cookie and the base domain on the resource is the same as the base domain on the web site, but the subdomain is different, popular browsers do not treat it as a third-party cookie.