I assume you are talking about the simply typed lambda calculus extended with the datatypes int and boolean, the terms _≤_, 1 and 2, and the typing derivation rules
--------------------------------
Γ ⊢ _≤_ : int → int → boolean
------------
Γ ⊢ 1 : int
------------
Γ ⊢ 2 : int
Using these, and the standard STLC typing rules, the type of your term is not int → boolean, rather, it is boolean as we will see below. Also, it β-reduces to 2 ≤ 1, so that should show you quite easily that it is a boolean.
But now to the meat of it: the typing derivation tree:
{x : int} ⊢ _≤_ : int → int → boolean {x : int} ⊢ x : int
----------------------------------------------------------------
{x : int} ⊢ x ≤_ : int → boolean {x: int} ⊢ 1 : int
--------------------------------------------------------------------
{x: int} ⊢ x ≤ 1 : boolean
To save on horizontal space, let's do the rest in a new tree:
{x: int} ⊢ x ≤ 1 : boolean
----------------------------------------
{} ⊢ (λx : int. (x ≤ 1) : int → boolean {} ⊢ 2 : int
-------------------------------------------------------------------
{} ⊢ ((λx : int. (x ≤ 1)) 2) : boolean ∎