F1 student, resident for rax purposes. 1098 T vs 1042 S

Hello,

I am an international student in USA under F1 visa. I am from Sri Lanka. Since I have been in USA for more than 5 years I am considered a resident for tax purposes.

I am confused on how to report my 1098 T and 1042 S.
1042 S and 1098 T both have kind of the similar information.
1042 S has what I received as a scholarship and I believe (see below) 1098 has that amount minus fees for the university.

But in 1042 S, it clearly says what was the amount I payed for federal and stat taxes.

How do I report these incomes and taxes, so I don.t get taxed twice?

Relevant numbers:
1098 - T
1. Payments: 238.50
2. Scholarship/Grants: 2814.00

1042 - S
1. Income Code 16
2. Gross Income 2576
7a Federal tax withheld 361
10 Total withholding credit 361
17a State tax withheld 109

Note:
I believe that what 1042 - S have (2576 = 2814-2398) is the Scholarship amount in 1098 T (2814) minus the Payments in 1098 T (238.5)

Thank you so much in advance for helping