Let me assume Gia had total books in starting = x books.
Number of books she got today = 5 books.
Number of books she returned = 3.
Total remaining books = 6 books.
We can setup an equation as
Total books in starting + Number of books she got today - Number of books she returned = Total remaining books .
Therefore,
x +5 -3 =6.
x +2 =6.
Subtracting 2 from both sides, we get
x+2-2=6-2.
x=4.
Therefore, Gia had total 4 books in starting.