It looks like you have two stations, A and B, with the specified IP addresses and you need to connect them. The question is trying to determine if you understand networking layers. You need to consider what layer each device (Hub, Bridge, Gateway, Router) operate on, and what you need to connect those two stations.
A hub just extends the physical layer (we'll assume Ethernet but it doesn't matter), so all the devices will need to use the same physical layer protocol and be able to communicate on all the higher layers without assistance.
A bridge operates on layer 2, the media access layer, so it can connect two different media types (for example Ethernet and Wi-Fi) and makes its routing decision based on layer 2 addresses (MAC addresses). A wi-fi access point is a common example of a bridge. Switches are also bridges.
A router operates on layer 3, the network layer (IP addresses in this case), it makes its routing decisions based on IP addresses, connecting different IP networks.
A gateway operates on protocol layers above layer 3 - it might connect two different e-mail protocols, or two different terminal protocols. For example, it might allow a telnet client to connect to a IBM3270 server.
In your case, you need something that will connect stations with IP addresses on different IP networks. You didn't give the netmask for the station's IP addresses, but I think we can assume that 198. and 121. are on different IP networks and will need a router to connect them.