If you want to see those columns, you have to add them to the main SELECT clause.
SELECT a.vardas, a.pavarde, c.gal, c.id, c.abonementas
FROM `y6fdt_igym_abonementai` AS a
INNER JOIN
(
SELECT max(galiojaiki) gal, id, abonementas FROm y6fdt_igym_sutartys
) c
on c.abonementas = a.id
Note that the id and abonementas columns in the subquery will not be from row with max(galiojaiki). It will just take them from some random row in the table. If you want those specific values, you need to use:
SELECT a.vardas, a.pavarde, c.gal, c.id, c.abonementas
FROM `y6fdt_igym_abonementai` AS a
FROM y6fdt_igym_sutartys AS c ON c.abonementas = a.id
INNER JOIN
(
SELECT max(galiojaiki) AS maxgal
FROm y6fdt_igym_sutartys
) d on c.galiojaiki = d.maxgal