Yes, Valdemaqueda is really small, I think it has less than 1000 inhabitants. You for sure can't take a bus from Valdemaqueda straight to Zamora. It's a very little pueblo.
You can go from Madrid to Valdemaqueda by bus, but you'll need to return to Madrid, to take a train to Zamora at Chamartín station (see
Renfe Web Page, information about Madrid - Zamora Trains ).
If you prefer a bus to Zamora,
Auto-Res has a line Madrid-Zamora (you can make an online reservation), I don't know any other bus line Madrid-Zamora.
===========================================
About Veldemaqueda - Villanueva de la Cañada, let's see...according to
Madrid Transport System Information Page (has an english version) :
------>First Option: Madrid -> Valdemaqueda / Valdemaqueda -> San Lorenzo del Escorial / San Lorenzo -> Villanueva de la Cañada.
You got the line 645, from Madrid (Moncloa Bus Stop, at Fernández de los ríos street) to Cebredos, it makes a stop at Valdemaqueda.
The line 640 links Valdemaqueda and San Lorenzo del Escorial.
The line 669 links San Lorenzo del Escorial with Villanueva de la Cañada.
-----> Second Option: Madrid - Villanueva de la Cañada (straight).
Line 581 from Madrid (Príncipe Pío bus stop, at Paseo de la Florida) to Quijorna, it makes a stop at Villanueva de la Cañada.
Line 627, from Madrid (Moncloa) to Villanueva de la Cañada / Brunete
(if it was any other option, I missed it)
===========================================
Visit the information pages for timetables, and check for possible updates. If this may sound a little bit confusing (I hope not), that's because my poor english, I'm sorry!