if(panel1.pos_x+panel1.size_x >= panel2.pos_x &&
panel1.pos_y+panel1.size_y >= panel2.pos_y &&
panel1.pos_x <= panel2.pos_x+panel2.size_x &&
panel1.pos_y <= panel2.pos_y+panel2.size_y) {
panel1 touches panel2
}
Should work, but untested. If you don't understand something, think a second about it (or 2), use the manual then feel free to ask.
Have you done the tutorial(s)?