Sure, it's possible. Most providers only care about things like sharing said network with all your neighbours.
(Even then, "forbidden by ToS" still doesn't mean "forbidden by law".)
Perhaps, using nonstandard radio frequencies for Wi-Fi would be illegal, but your routers won't let you do that anyway, so that's not a problem.
As for technical side, this has been asked and answered many times on the site (thus the -1)…
One way would be to just connect B's "WAN" port to A, like you describe – basically to stack the two routers, with their own networks.
However it's a messy way of doing it, especially if you ever needed to configure port forwarding. One layer of "private addresses" is already awful enough; it is best to avoid such stacking as much as possible.
So don't do that.
Instead, consider what the "router B" consists of. Usually it's a "home gateway" containing an Ethernet switch, a Wi-Fi access point, maybe an ADSL modem, and only then a router – all in a single box.
┌─ ["LAN" Ethernet ports]
["WAN" Eth port] ─── [NAT] & [IP router] ──┤
└─ ["LAN" Wi-Fi access point]
Out of all these parts, you only need the Wi-Fi access point – as in the name, the AP's job is just to provide Wi-Fi access to a LAN, exactly the same way an Ethernet port provides access to a LAN, and since you can have multiple Ethernet ports, you can also have multiple Wi-Fi APs.
So ideally you would have only one network, with "router A" doing the routing, but multiple access points connected to it, all with the same SSID (network name).
To do that, you have to disable all 'router' features in router B. That's the "access point" mode which Aesin mentions.
Many gateways don't actually have such a mode, though, so you might need to configure it manually:
Most importantly, turn off "DHCP server" in router B.
Change router B's own IP address to be in the same network as router A. For example, if A currently has 192.168.1.254, then configure B to be 192.168.1.200 or similar.
Change router B's Wi-Fi settings to be identical to router A's – same network name, same WPA passphrase.
Finally connect both routers using their LAN ports.
(Step 4 could be "switch router B's WAN port to bridge mode", but too many gateways don't actually have an option to do that either, so just using the LAN ports is practically the same thing.)
The instructions are a bit vague because different routers & gateways vary a lot in what features they support, in what those features are called, and in how they're configured.