How can i get my tax 2017 back

Hello guys i have a question about tax i have work since July 2017 and  been paid for tax 6 months but well i'm not residence yet as per not in 182 day in calender year  and i got mail from  tax that i have to pay for another six moth on 2018 from May onward :(

how can i get back  my tax from 2017 and why do i have to pay for 2018? for another 6 month? any advise
by the way since Jan 2018 - july 2018 i believe i'm exit the country about 22 days
so can i claimed ?

Depends if the 22 days are personal absences i.e. holiday travel.