Two adjacent angles about the intersection of two straight lines must equal 180°, because they lie above a straight line. This means that A+B=180° so:
x+30+3x+10=180 combine like terms on left side
4x+40=180 subtract 40 from both sides
4x=140 divide both sides by 4
x=35°
So A=x+30=65° and B=3x+10=115°