You need an extra spaces around the 'AND'
$qs1="select * from station_details where st_code IN
(
( select DISTINCT st_code FROM students_info , ps_branch WHERE ps_code=st_code AND std_cg >".$_POST['Cgpa'].
" AND ".$_POST['branch']."=".'1'."))";
$query1=mysqli_query($con1,$qs1);
The way to debug this is to show the value of $qs1 by using die($qs1);
after $qs1 it is set and before executing the query. Then you can see the problem.