I will attempt to answer your question, although next time, please be more clear; at least show us your existing code.
#Assuming b = 2
b=2
#Error Handling
try:
#Gets user input, explicitly converts to int
a = int(input("A="))
#Whatever math formula THAT is :P
c = a*a+b*a
except ValueError:
print("ValueError: Input must be integer, not string.")
else:
#Prints c if nothing goes wrong
print(c)
Hopefully that answered your question
~ KK