Rear disk brakes stopped working in Trek DS 2
The liquid in the top photo is hydraulic fluid. 

You probably unscrewed the bleed port screw at some point and now your system has less fluid than it needs and also air. 

Seek a tutorial using your preferred search engine "bleed tektro brakes" on how to bleed your brakes and follow it.

When you have done that you need to check two more things. 


There's no fluid on the pads. 
There's no fluid on the rotors. 


You'll know either of these things if after a successful  bleed theres no braking power/friction even with the brakes jammed on hard. 

Clean rotors with isopropyl alcohol (not meths or petrol) and clean paper towels. Really bad contamination might require sanding the rotor with fine grain sandpaper too. Try isopropyl first. 

Contaminated pads should be replaced or if you cant afford to there's a hack which you really shouldn't do. 

Dont do this. High likelihood of destroying pads anyway 


Ventilate well. Wear something over your eyes. 
Place pads metal side down on a cold stove top element and then turn on the element. 
Wait for the element to heat up and the fluid will start burning off too. 
Once the fluid has burnt off (smoke stops) remove pads from element immediately with a tool. This will be in the order of less than 60 seconds. 
If a pad gets too hot it will crack and need to be thrown away. Don't turn the element on too hot.
Allow pads to cool naturally. Clean pads with isopropyl.