The tram (as any in Bonn) will have a ticket machine inside but be aware that it only takes coins. If you take a bus you can pay at the driver. The price at the moment is 2.80€ for a single trip.
You can also buy ticket beforehand at any of these shops or these counters but most (if not all) are likely closed in the evening.
Do not buy a ticket from a ...
A very quick search for "VRS Anschluss Ticket" reveals the official page (by VRS), where it is stated that for VRS-AnschlussTicket and EinfachWeiterTicket that additional persons travelling on the pass holder's pass have to get their own ticket.
For example for the VRS-AnschlussTicket:
Achtung: AnschlussTickets gelten nur in Verbindung mit VRS-...
The VRS Pocket Guide (PDF) has all the info you need in a very accessible format. I've copied the fare segment here:
The weekly ticket (which always starts on Monday!) can be very cost effective if your travel matches it.
To figure out which type of ticket you need (1-7) you can input your trip in this journey planner: http://auskunft.kvb-koeln.de/kvb/cgi?...
you can get day-passes (called "TagesTicket") if you know you need to take the trains regulary on that day. They cost 8.50 for 1 person or 12.90 for 5 persons in the area of cologne, for the other variants check out their site (https://www.vrsinfo.de/tickets/preisliste.html)