Answer and Explanation:
Each subnet can only be power of 2s.
Thus first subnest would have 2^7 = 128 IPs (100 were required)and second subnet would have 2^6 = 64 IPs (42 were required).
Subnet A with 100 Hosts required for 192.168.100.0/25 network:
Subnet mask -> 255:255:255:128
(Mask for 11111111:11111111:11111111:1000000)
Number of usable Host : 2^7 - 1 - 1 = 126
(Since we cannot use IP addresses ending in 0 and 127)
IP Network Address:
192.168.100.0/25
First Valid IP address:
192.168.100.1
Last Valid IP address:
192.168.100.126
Subnet Broadcast IP:
192.168.100.127
Subnet B with 42 Hosts required for 192.168.100.128/26 network:
Subnet mask -> 255:255:255:192
(Mask for 11111111:11111111:11111111:1100000)
Number of usable Host : 2^6 - 1 - 1 = 64-2 = 62
(Since we cannot use IP addresses ending in 0 and 63)
IP Network Address:
192.168.100.128/26
First Valid IP address:
192.168.100.129
Last Valid IP address:
192.168.100.190
Subnet Broadcast IP:
192.168.100.191